Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# greyd 4/18/2008 4:54 AM (edited 4/18/2008 4:56 AM)
Hey Martin,

Can you explain functional differences between cuyahoga service classes and modules class.
Some coding standards - "this can and this cannot..." - in each type of cuyahoga piece of code would be very appreciated.

Thanks
# aliozgur 4/18/2008 8:55 AM (edited 4/18/2008 8:56 AM)
Hi,
Although the question is pointed to Martin I would like to give some initial tips

- Services provide access to core Cuyahoga functionality to module developers

- If you do not like the default implementation of the core Cuyahoga services you can implement your own alternative and plug your implementation into Cuyahoga declaratively. (Open Config folder and change type declaration in services.config file)

- Modules are also pluggable to Cuyahoga framework

- Cuyahoga do not relies on your module, however Cuyahoga needs core services to function nicely

- Services and modules are key points to Cuyahoga customization. Service oriented approach enables core functionality customization, however module development enable you with custom business implementation.

Some examples

- If one of your modules need to reauthenticate a user you would need to get instance of the DefaultAuthenticationService class implementing IAuthenticationService interface from the IoC container.

- If you would like to send an e-mail from one of your modules you would do the same things explained in the previous example to get and use methods defined on IEmailSender to send the e-mail.

- Think that your ISP does not allow your application to send e-mails with SMTP you can only use AspEMail. What would you do? You do not have to modify the DefaultEMailSender class, instead you would create your own class implementing IEMailSender and tell Cuyahoga to use your implementation declaratively via services.config

- If you would like to develop a module , say an issue tracker module, you do not need to modify any core services. Your module can be consumer of the core services provided as I mentioned before. You can find documentation for the module development details in Cuyahoga Web site (module developers guide)

I hope this information helps you.
# martijnb 4/18/2008 10:42 AM
Wow, thanks Ali. I couldn't have put this any better!
# greyd 4/18/2008 7:09 PM (edited 4/18/2008 7:20 PM)
martijnbWow, thanks Ali. I couldn't have put this any better!

Dear Martijnb, aliozgur

Very impressed with your response time... Thanks, it's gratifying

Another point...
Can you explain me how i can do a partial modifying at database script install (extended, for example) to register tables at Cuyahoga Database (Application Database) and Business Database (Operations Database).

Future points...

Current version of cuyahoga page it's strongly base at web forms design. But... has some support to "Two Way DataBinding" (vide some interesting related articles at codeproject).
I saw some very elegant implementation at spring.net Page extended class. Castle integration it's engine is not based at webforms (correct?). Can you give me some ideas?

Redirect several logging information (auditing, fatal error, etc) to Cuyahoga Database (through a extended Logger Implementation that use Nhibernate) and replicate some useful user (user identity and profile) information to my Operations Database
# greyd 4/18/2008 7:10 PM (edited 4/18/2008 7:13 PM)
aliozgurHi,
Although the question is pointed to Martin I would like to give some initial tips

- Services provide access to core Cuyahoga functionality to module developers

- If you do not like the default implementation of the core Cuyahoga services you can implement your own alternative and plug your implementation into Cuyahoga declaratively. (Open Config folder and change type declaration in services.config file)

- Modules are also pluggable to Cuyahoga framework

- Cuyahoga do not relies on your module, however Cuyahoga needs core services to function nicely

- Services and modules are key points to Cuyahoga customization. Service oriented approach enables core functionality customization, however module development enable you with custom business implementation.

Some examples

- If one of your modules need to reauthenticate a user you would need to get instance of the DefaultAuthenticationService class implementing IAuthenticationService interface from the IoC container.

- If you would like to send an e-mail from one of your modules you would do the same things explained in the previous example to get and use methods defined on IEmailSender to send the e-mail.

- Think that your ISP does not allow your application to send e-mails with SMTP you can only use AspEMail. What would you do? You do not have to modify the DefaultEMailSender class, instead you would create your own class implementing IEMailSender and tell Cuyahoga to use your implementation declaratively via services.config

- If you would like to develop a module , say an issue tracker module, you do not need to modify any core services. Your module can be consumer of the core services provided as I mentioned before. You can find documentation for the module development details in Cuyahoga Web site (module developers guide)

I hope this information helps you.

Can i think Modules functionality (methods ,events and properties ) like a kind of "high level appletts functionality". Internal applet's operations must be performed through services class and inter module operation through "BaseModule" methods?
# aliozgur 4/21/2008 9:42 AM (edited 4/21/2008 9:44 AM)
Thanks Martin, I love to say that I love Cuyahoga very much :) Also thanks to you greyd.

Coming to your questions from the first post I understand that you want to seperate Cuyahoga database and your bussiness database. If that is the case I would like to give you some general suggestions

- Current version of Cuyahoga does not support installation of modules to a different database than the Cuyahoga database

- Actually you do not need to install your modules to a different db than Cuyahoga, but there is one important point; while your modules are installed on Cuyahoga db, they can still use a different db for your business implementation. It is up to you and your module implementation.

- I would also suggest you to follow the service oriented approach for your modules. For example you can separate your class implementation and data access implementation as 2 different assemblies and use Cuyahoga's services.config to declare your DAO implementation.

- Another important point is you can use your custom Cuyahoga modules as Views (thinking in MVC domain) and if can not find better way at most as Controller too. But you should definitely separate your Model (business rules implementation). It is best for you not to include any Cuyahoga specific implementation in your Model assembly if possible, if not possible plug this Cuyahoga specific code to your Model in a service oriented way.

I think in your second question you tried to ask if Cuyahoga supports or will support alternate View engine. I have no idea I think martin can answer this question.

About the logging issue
- Cuyahoga uses Log4Net for its own logging purposes. I think you can redirect log output to a db by configuring Log4Net section in Web.config file.
- You can implement custom logging for your modules. If you seperate your application to layers and centralize some common operations like Save,Update and Delete entities you can easily keep your custom log anywhere.

I did not understood your last question, if you explain it in more details I would be pleased to answer that one too.
# greyd 4/21/2008 5:49 PM
aliozgurThanks Martin, I love to say that I love Cuyahoga very much :) Also thanks to you greyd.

Coming to your questions from the first post I understand that you want to seperate Cuyahoga database and your bussiness database. If that is the case I would like to give you some general suggestions

- Current version of Cuyahoga does not support installation of modules to a different database than the Cuyahoga database
- Actually you do not need to install your modules to a different db than Cuyahoga, but there is one important point; while your modules are installed on Cuyahoga db, they can still use a different db for your business implementation. It is up to you and your module implementation.

Ok. Its ok for me module install at Cuyahoga Database. My question is : Internal module classes (see Cuyahoga.Modules.ECommerce for example) must be thinked as specific database (business database) pieces. So, at deployment time would be interesting write sql files to register my module and register my new tables in a specific database. So Cuyahoga Informations at Cuyahoga Database and Intrinsic Module Information aty Business Database. I forget to mention that i plan write a several modules to work together and share business related information.
aliozgur- I would also suggest you to follow the service oriented approach for your modules. For example you can separate your class implementation and data access implementation as 2 different assemblies and use Cuyahoga's services.config to declare your DAO implementation.

- Another important point is you can use your custom Cuyahoga modules as Views (thinking in MVC domain) and if can not find better way at most as Controller too. But you should definitely separate your Model (business rules implementation). It is best for you not to include any Cuyahoga specific implementation in your Model assembly if possible, if not possible plug this Cuyahoga specific code to your Model in a service oriented way.

It's a little hard to accomplish a radical separation because i'll really need to write several "abstract class" / Interfaces to deliver for my business developer some functionalities. Examples: Email and Persistence. Cuyahoga.Core provides CommonDao and IXXXEmailSender.. I'll need create some phantom pieces uniquely to avoid direct reference "using Cuyahoga.*" ? No seems useful.
aliozgurI think in your second question you tried to ask if Cuyahoga supports or will support alternate View engine. I have no idea I think martin can answer this question.

Don't seems that Cuyahoga support webforms... But, the first versions of Cuyahoga it's webform based... no ?
aliozgurAbout the logging issue
- Cuyahoga uses Log4Net for its own logging purposes. I think you can redirect log output to a db by configuring Log4Net section in Web.config file.
- You can implement custom logging for your modules. If you seperate your application to layers and centralize some common operations like Save,Update and Delete entities you can easily keep your custom log anywhere.

My issue it's write some ILog persistent hbm maps and avoid NHibernate/Log4Net loop at the Save operations (Save call Log that call Save that call log... :) ) Nothing so hard... Perstence target db will be Cuayhoga Database too, because i think that log it's a "application issue".
aliozgurI did not understood your last question, if you explain it in more details I would be pleased to answer that one too.

Replicate user table of cuyahoga database at my business database. If i has class acces via Cuyahoga.Core dependency no make sense do not have the same information access (with foreign key possibilities) from the database viewpoint...

Sorry by misunderstoods. My english write capabilities it's leak