|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
Note: This is an unedited contribution. If this article is inappropriate,
needs attention or copies someone else's work without reference then please
Report This Article
IntroductionCatharsis is a complete framework for developing web applications. The question is, has she (Catharsis) something essentially better than others, what could promote her to an everyday usage? Answer must come from you. All source code can be found here.
Current release: 0.9 .106.11.2008 - Upgraded to ASP.NET MVC (Beta) : see below After two month after first release I've realized, that there are still some gaps in the BackgroundASP.NET Web form pages are dead, or at least out of the date. Do you really know all of the 23 (or how many) page life-time events? And do You need all of them? Even in Microsoft they realized, that ASP.NET need a big change and purification (in Greek 'purification' == 'Catharsis') The result is Among other problems in Microsoft world of web-forms, there is depression of the OOP programming, caused mainly with How could you think in object, if NHiberante 2.0 (even 1.2) can correct your sad ideas, because of narrowing the OOP world. And maybe it also can improve your designing habits when working with relational-database. Inheritance, polymorphism ... and fancy lazy mode (it’s not OOP but how effective) Well, we have ASP.NET MVC (today Preview 5) and NHibernate 2.0 (final) and lot of good practices known. The missing part is the pot, which will allow us mix it and prepare delicious meal for our users. Catharsis featuresI do believe, that this article will have many descendants. So, do not waste time and place and just briefly about Catharsis: She is the 'Web-Application Framework' gathering best-practices... based on ASP.NET MVC, NHibernate 2.0.
Catharsis is strongly OOP! Using 1) inheritance as a key feature for code reuse and 2) polymorphisms as the only way to communicate among layers (objects are working with interfaces! without knowing who is implementing them) Powerful features are:
For all of that Catharsis has a Guidance. Every needed piece of code you'll find on a http://www.codeplex.com/Catharsis. Catharsis.GuidanceGuidance provides two type of tasks:
Guidance itself should be the target of an article (to create them took me lot of days of my life ... ). But their final stage is 'wunderbar' ... Needed PrerequisitesNeeded knowledgeVisual Studio (2008) - You need to have SP1! installed and VB.NET Support. Both these requirements are MUST. VB.NET has unique support for Linq to XML. When you'll see it, you will never use anything else to generate Word or Excel files directly from your web application! MVC - I do expect that you are well oriented in NHibernate – I do expect you are familiar with Needed SW packagesBefore you can start using Cathrasis.Guidance you have to install:
And finally you can choose to install
From the version 0.9.1 there is The 'ProjectBase' namespace instead of 'Catharsis'. The aim is clear - to quickly start to use Catharsis framework in your company ... Finally I suggest you install provided SQL scripts (create tables and insert few objects) or restore backup. It will allow us run solution very quickly. Scripts are needed for new solution (they create infrastructural tables). If you are running example, then you should use backup (Source codes and MSI are available here.) Creating our first SolutionIf you have installed all needed stuff, let's start with a new solution. Open Visual Studio 2008 and select Create new project. In the menu you can see now item: Guidance, which contains one solution - Catharsis.
Name new solution like '
When you click finish, If you've created Database as mentioned above, and provided correct connection string in a setup of a new solution, you should be very near to a first run of your new Web application. Select ' Catharsis is runningIf everything went right, you should see the HomePage screen:
.NETI’d like to point out one fundamental thing on Catharsis, which (when I went through all my articles) was not said. Firstly I do not accept everything what’s coming on the market (even open source one) until I do play with it and feel friendly. (The example of bad experience for me was ‘Linq to Entities’ which I was looking forward as a child). The pillar of Catharsis, I must mention, is Microsoft .NET C# 3.5! From my point of view and experience the C# is at the moment leading OOP programming language. Anything you need is there and lot of features extends the ability of day to day coding. The last missing thing in C# is multiple inheritances (but as I heard rumors it will be changed). Despite of that fact the Extensions methods at current version can do lot of useful job. And also LINQ itself as the part of .NET 3.5 brings tremendous simplification. I think that it must be written: MS C# .NET 3.5 is precious diamond! I am looking forward .NET 4.0 as a child … In a next part we will examine the Homepage, and the built-in stuff. Enjoy Catharsis. Source codeHistoryCatharsis 0.9.1Upgrade 06.11.2008Two fundamentals upgrades were made in Catharsis 0.9.1: 1) Catharsis was upgraded to ASP.NET MVC Beta. Updated 26.10.2008WPF - Windows client supportCatharsis is based on multi-tier architecture and is strongly OOP. As the proof of concept, Catharsis was extended to allow development not only for web-applications but also for Windows-clients based on WPF (do not confuse with smart clients). Catharsis Guidance now allows you to create two types of solutions:
Web is based on ASP.NET MVC. Windows-client uses WPF as a presentation tier and Catharsis inner MVC pattern implementation to handle it. The result is almost the same approach! Development steps, guidance usage, classes creators, etc - that all is the same for both types of applications (Web or Windows)! It means that you can use the best practices you know in both worlds without any changes. Excel exportAnother feature is based on Visual Basic .NET. Therefore you have to install VB.NET support to your VS. VB.NET has tremendous built-in ability to handle XML (download code and observe). To simply cerate Excel extracts there is new project in every solution (named LinqToXml). The Unit tests will uncover how easy is to create Excel sheet. Enjoy Catharsis.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||