If you have learn about OOAD, you should know about class diagram. In UML, class diagram is devided among
- Boundary Class; which responsible to User InterfaceEntity Class, which hold data about an object (for example Car.cs)Control Class, which responsible for coordination, interaction
http://www.topcupid.com/UML.zip
I had try to search on MSDN Library but only find an explanation aboutMCV (Model-Control-View). In MVC, Model is like an entity class (forexamle car class), View is the ASPX page, Control is ASPX code behind.
MVC is like boundary, entity, control class in UML, but things that make me confuse is :
1. Boundary is a class in UML, but in MVC, the view is the aspx page which is not a class
2. If I make code behind in ASPX page as a boundary class, then who is the control class?
Please help me
Thanks, any answer will be appreciated.
Yonscun
Here is what a member of the ASP.NET Teamtold me about MVC in ASP.NET:
First, let me point out that MVC has never been a pattern that fit well in ASP.NET. Actually, Martin Fowler introduced in "Patterns of enterprise application architecture" the Page Controller pattern that better reflects a typical ASP.NET application. There are some MVC frameworks for .NET, but they are somewhat convoluted and sacrifice most of the cool things of ASP.NET on the MVC altar.
However, if you are truly keen to use the MVC pattern with ASP.NET, the following article will help you:
Applying Robustness Analysis on the Model-View-Controller (MVC) Architecture in ASP.NET Framework, using UML
If you want to use theconcept of MVC, without the true pattern, you can do the following (which many developers do): consider your .aspx page to be theview, consider its code-behind to be thecontroller, and allow a business object (or even just a DataSet) be themodel. This wouldnot be the MVC pattern, but it will give you a way of separating concerns, and a way that fits well with ASP.NET.
By the way, an .aspx pageis a class, it is simply authored in a different way (it uses declarative programming rather than procedural programming).
I was preparing for the IBM OOAD exam in 2001 when I got the email to start C# training from Microsoft. And last year we used a lot of MVC reference materials from MSDN and Microsoft is expanding the patterns but to enable developers in a web application context not the complete UML. Try the links below for a lot of UML resources including complete
factory pattern with class diagram and C# code all from OO experts. Hope this helps.
http://openmymind.net/NetDesignArticles.aspx
http://msdn.microsoft.com/asp.net/default.aspx?pull=/library/en-us/dnaspp/html/CustEntCls.asp
Hi thank for replying,
Actually Model-View-Control is not my primary goal.
I just try to figure out how to implement boundary classes, entityclasses, and control classes. After googling and searching in MSDNlibrary, I found about this MVC concept.
But any body know how to implement this boundary, control, and entity class in ASP.net?
You are a student so try these links everything you need to study is covered. Hope this helps.
http://consulting.dthomas.co.uk/software_architecture_consulting/articles_resources.htm
http://msdn.microsoft.com/architecture/community/webcasts/default.aspx
Hi, thanks to all (a really helpful link)
Eh, I confuse about "broker class" that said can separate business (entity) class with database connection.
If "car" class has a broker class named "CarBroker" class then please can anyone tell me how this class work?
Edit
The Broker is middletier like message queues or Microsoft Biztalk, the later is very expensive but it can talk to all systems through XML. Again you are a student so I have got you study links but try and get UML distilled by Martin Fowler so you can get the short version of all you need. Asp.net stripes all these to bare bone because HTTP is stateless, human interaction application needs are different from business oriented UML. There is a problem with the second link the *** replaced (d1ck ) which is Richard in short but not accepted word on the forums. Hope this helps.
http://www.jot.fm/issues/issue_2004_09/article1
http://www.csci.csusb.edu/***/samples/uml.html
Hi thanks everyone, your links really help me a lot
I read some of tutorial link abouve and read again my OOAD books (simmon bennet - MC Graw Hill), now It's a little clear how this broker work.
But I still confuse in better way to store my newly created class to MSSQL database.
Lets say an administrator want to post a new article to his website so all visitor can read it.
The admin surely will create a new instance of class article and store it on database.
It's pretty simple to create an instance of article class. But when an instance of article class is created, it must to immediately stored to database.
But Who will responsible to store article to database? The article class itselft or it's database broker class?
If article class is responsible to implement saveToDatabase() function then separation between article (entity class) and article broker class (database broker class) will be broken.
If broker class is responsible to implement saveToDatabase() function then how an instance of article class send itselft to database broker? or maybe article class just need send all its attibute?
Please help me,
Try this it covers Objects and Data including O/R(Object relational ) Mapping but I think you should post on the Architecture forum to get the right answer. Hope this helps.
http://martinfowler.com/eaaCatalog/
0 comments:
Post a Comment