Login

Username

Password





Register   Reset password

Get Cuyahoga at SourceForge.net. Fast, secure and Free Open Source software downloads

Forum

Welcome Guest Search | Active Topics | Members

Customize Registeration Process Options
bheeks
Posted: Tuesday, September 29, 2009 2:31:11 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
HI

Hope all is well. I wold just like to know how do I go about customizing the registration process? What I would like to do is basically once a user registers, we as the 'administrator' would first like to access the new user then if the user meets a certain criteria, we then activate or instantiate the account

Regards
Constructor
Posted: Tuesday, September 29, 2009 7:43:35 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
I think you would be best creating your own registration module. It would not be that difficult. I have done before and soon again must create a customised registration module.
bheeks
Posted: Thursday, October 1, 2009 2:14:06 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi

Thanks for the reply. I really appreciate it. This is the first time I am taking up such a project. Do you have any pointers to give me when undertaking this task?


Regards
Constructor
Posted: Thursday, October 1, 2009 5:44:42 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
This post (made quite recently!) is a good place to start: http://www.cuyahoga-project.org/home/forum.aspx?g=posts&t=1347

There are some documents on this site also: http://www.cuyahoga-project.org/home/developers.aspx

Check out the module developer document.

It all may seem a little daunting at first but when you get the information inside your head it will trigger lots of ideas and possibilities. It is worth the effort!
bheeks
Posted: Tuesday, October 6, 2009 5:22:55 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi

Thanks again for all the resources I really really appreciate, do you perhaps know of any other tutorial around that takes through creating a data driven module?
Constructor
Posted: Tuesday, October 6, 2009 6:28:08 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
bheeks wrote:
Hi

Thanks again for all the resources I really really appreciate, do you perhaps know of any other tutorial around that takes through creating a data driven module?


If you post or email a SQL Server Table (or even type the fields here) I can send you an installable module for you to examine and back engineer to understand how it is put together.

You will be then able to view the structure and see how the install/uninstall scripts, NHibernate mappings and POCO's, module class, module and module admin all relate to each other.

Also the post build events etc.

It may sound complicated but it really is not too bad.
bheeks
Posted: Tuesday, October 6, 2009 6:35:15 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi

Thank you, thank you so much

EmployTable
-strName
-strSurname
-intDepartmentID

DeparmentTable
-intDepartmentID
-strDepartment

Hope the above suffices

Regards
Constructor
Posted: Tuesday, October 6, 2009 6:46:38 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
bheeks wrote:
Hi

Thank you, thank you so much

EmployTable
-strName
-strSurname
-intDepartmentID

DeparmentTable
-intDepartmentID
-strDepartment

Hope the above suffices

Regards
Farhad


I will post this later today.
Constructor
Posted: Tuesday, October 6, 2009 3:00:51 PM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
Here is the test module.

You need to unpack the files and add the folder to your solution (right click > add existing item > browse to the project and add it).

Build the solution. You may need to add some references.

When you are looking at how it is put together one thing to remember (as it puzzled me when I started building modules). The NHibernate mapping files need each to have their build actions set to 'Embedded Resource'. If not you get errors. This frustrated me when I first made a module.

I hope this helps people begin to get an understanding of modules.

File Attachment(s):
Cuyahoga.Modules.Company.zip (16kb) downloaded 74 time(s).


bheeks
Posted: Wednesday, October 7, 2009 1:41:41 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi

Firstly....thank you soooo much for your assistance, it's been great and much appreciated.

I will get my head around this and let you know my progress.

Thanks again
bheeks
Posted: Wednesday, October 7, 2009 6:24:14 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi

Thanks again for the module..it is helping me alot.

I am currently looking at the hbm.xml files. Is it mandatory to have the relationship tags i.e. many-to-one...
and could you perhaps exlpain the bag tags

Regards
Constructor
Posted: Wednesday, October 7, 2009 7:00:25 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
bheeks wrote:
Hi

Thanks again for the module..it is helping me alot.

I am currently looking at the hbm.xml files. Is it mandatory to have the relationship tags i.e. many-to-one...
and could you perhaps exlpain the bag tags

Regards


Here is a rundown of NHibernate Mapping. It helped me a lot and I like the no-nonsense to the point way it is written, see: https://www.hibernate.org/hib_docs/nhibernate/html/mapping.html

In short the < bag> is just one way to declare a collection in the mapping. Others being < set>, < list>, < map>, < bag>, < array> and < primitive-array>.

For more on this see: https://www.hibernate.org/hib_docs/nhibernate/html/collections.html

It is also worth while looking deeper at the other documentation. You can do this later after you get things working.

With the collections mapped you can do things like this:

Code:
Employee emp = _module.GetEmployee({Id});
string theEmployeesDepartment = emp.ParentDepartment.Name;


From the Employee object you can get to the Department object (or the related Department table content) via ParentDepartment directly. So you can traverse the object tree. When you have a few tables linked and you need to get related information (objects) easily then this is REALLY great.

This is not the clearest way of putting it. Just check the links and things should become clear.
bheeks
Posted: Monday, October 12, 2009 6:28:38 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi

Another good article for anyone interested

http://www.theserverside.net/tt/articles/showarticle.tss?id=NHibernate

Regards


bheeks
Posted: Monday, October 12, 2009 6:31:21 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Constructor wrote:
bheeks wrote:
Hi

Thanks again for the module..it is helping me alot.

I am currently looking at the hbm.xml files. Is it mandatory to have the relationship tags i.e. many-to-one...
and could you perhaps exlpain the bag tags

Regards


Here is a rundown of NHibernate Mapping. It helped me a lot and I like the no-nonsense to the point way it is written, see: https://www.hibernate.org/hib_docs/nhibernate/html/mapping.html

In short the < bag> is just one way to declare a collection in the mapping. Others being < set>, < list>, < map>, < bag>, < array> and < primitive-array>.

For more on this see: https://www.hibernate.org/hib_docs/nhibernate/html/collections.html

It is also worth while looking deeper at the other documentation. You can do this later after you get things working.

With the collections mapped you can do things like this:

Code:
Employee emp = _module.GetEmployee({Id});
string theEmployeesDepartment = emp.ParentDepartment.Name;


From the Employee object you can get to the Department object (or the related Department table content) via ParentDepartment directly. So you can traverse the object tree. When you have a few tables linked and you need to get related information (objects) easily then this is REALLY great.

This is not the clearest way of putting it. Just check the links and things should become clear.




You don't perhaps have the mapping 2.0 xsd ?
Constructor
Posted: Monday, October 12, 2009 8:49:01 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
bheeks wrote:

You don't perhaps have the mapping 2.0 xsd ?


I am unsure what you mean? What is wrong?
bheeks
Posted: Tuesday, October 13, 2009 2:44:13 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Constructor wrote:
bheeks wrote:

You don't perhaps have the mapping 2.0 xsd ?


I am unsure what you mean? What is wrong?


Hi

My bad for not being a bit more clearer and I apologise. I was talking about the NHibernate xsd mapping file for Visual Studio to bring up the intelli-sense when creating the NHibernate mapping file I finally was able to download it after several attempts.

Regards
Constructor
Posted: Tuesday, October 13, 2009 5:01:49 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
bheeks wrote:

Hi

My bad for not being a bit more clearer and I apologise. I was talking about the NHibernate xsd mapping file for Visual Studio to bring up the intelli-sense when creating the NHibernate mapping file I finally was able to download it after several attempts.

Regards


Oh, I now understand. You wanted intellisense for NHibernate Mapping.

If you copy nhibernate-mapping-2.0.xsd (or other required version) and nhibernate-configuration-2.0.xsd (or other required version) from the install location to...

C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml (or wherever VS.NET is installed)

...you will get IntelliSense and validation in the VS.NET XML editor when editing NHibernate mapping and configuration files.

You may need to manually set the 'Schemas' properties value to this file. You can find this in the Visual Studio properties window when you have the mapping file open. The properties of the opened mapping file.

You can get the .xsd files from here by downloading the package: http://sourceforge.net/projects/nhibernate/files/NHibernate/
bheeks
Posted: Tuesday, October 13, 2009 5:07:52 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi Constructor

Going through the link I put up earlier(http://www.theserverside.net/tt/articles/showarticle.tss?id=NHibernate), they mention adding the Domain classes to the NHibernate Configuration obj. I do not see this happening in the sample you provided. Does Cuyahoga engine add these domain classes to the NHibernate Config itself?

Regards
Constructor
Posted: Tuesday, October 13, 2009 8:39:50 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
bheeks wrote:
Hi Constructor

Going through the link I put up earlier(http://www.theserverside.net/tt/articles/showarticle.tss?id=NHibernate), they mention adding the Domain classes to the NHibernate Configuration obj. I do not see this happening in the sample you provided. Does Cuyahoga engine add these domain classes to the NHibernate Config itself?

Regards


If you are looking at how to use NHibernate then you do not have to worry about that when creating modules. This is only required when you use NHbernate in your own site.

It is much simpler than this when creating modules. Cuyahoga takes care of all that. Just look at the module provided and the .pdf on how to create a Cuyahoga module.

Take a look at the modules SQL install script. It adds an entry into the cuyahoga_moduleservice

INSERT INTO cuyahoga_moduleservice (moduletypeid, servicekey, servicetype, classtype)
VALUES (etc...etc...etc...)
GO

This is how you register your services...

In short the module (whatever one you make) inherits the ModuleBase.

public class MyNewModule : ModuleBase

This has the NHibernate session from the current ASP.NET context in it:

protected ISession NHSession

Next you will be led into IOC happy
bheeks
Posted: Wednesday, October 14, 2009 2:04:53 AM
Rank: Member
Groups: Member

Joined: 9/29/2009
Posts: 23
Points: 69
Hi

Thanks for that...makes a lot of sense...you really are the pro in this huh? happy .....

I see that the classes have attributes i.e. [Tranactional] and so on. Where will I find more info on this?....

IOC?....International Olympic Committee?...lol...just kidding....okay poor joke...but what does IOC stand for?
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Yet Another Forum.net version 1.9.0 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.