application architecture - driving forces, approaches, and implementation co

Upload: shivdutt-bhardwaj

Post on 06-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 Application Architecture - Driving Forces, Approaches, And Implementation Co

    1/12

    Application Architecture - Driving Forces, Approaches, and Implementation Considerations - CodeProject

    Here is a minimal set of decision parameters for choosing your platform

    Cl i en t cho i ce/ P re fe rence

    Step 1: Client's choice/alignment with technology platform. Step 2: Existing infrastructure the client has in place to support any of the suggested technology platforms.

    Cost / Budge t

    Step 1: Implications on hardware and software requirements (like hosting platform cost, infrastructure cost etc.). Step 2: Implications on resource requirements (availability of resources, training cost etc.). Step 3: Cost comparison of in-house development vs. outsourcing, for each technology.

    Exist ing depend encies and Code base

    Step 1: Is this an end to end project, re-write, take over, or a migration? Step 2: If not end to end, do you have any existing dependencies and code base?

    P la t f o r m m a t u r i t y

    Step 1: Find out whether the suggested platform can cover all requirements and future requirements. Step 2: Can it satisfy interfacing requirements? (E.g., RoR is not mature for handling Web Services).

    Ava i l ab le f r ameworks

    Step 1: Are there any existing frameworks/Open Source tools already available? (E.g.: OSCommerce/PHP forE-Com).

    Step 2: If yes, what is the investment for building expertise in this existing framework to reduce TCO? Step 3: Do you have any existing frameworks/reusable components to reduce TCO?

    Comp lex i t y and S i ze (Es t ima ted us ing FP o r some th ing )

    Step 1: Estimated size of the project. Step 2: What is the cost comparison between platforms (based on finding out the time to execute for

    each platform based on the total FP)? Step 3: Do you have any existing practices successfully applied earlier to execute the project in a

    technology platform?

    Pro jec t mode l (T ime and Expense / F i xed b i d e tc .)

    Step 1: If Fixed Bid, which platform is suitable for quickest development and deployment? Step 2: Do you have any existing practices successfully applied earlier to execute the project in a

    technology platform?

    Pro jec t t ype (Desk top / Web App / Serv i ces e tc . )

    Step 1: Feasibility analysis of candidate technology platforms for this project (e.g., RoR is not suited fora Windows Service application).

    Step 2: Eliminate technologies that are not feasible.

    In te r faces to dea l w i th

    Step 1: Feasibility analysis of candidate technology platforms for interface support (e.g., if you areconsuming REST services, RoR has a weightage).

    Step 2: Identify platform specific interface requirements.

    i i

    C# ASP.NET ?

    Whats new in WCF 4.5? Improved

    streaming in IIS hosting

    Creating your own (customized)

    standard endpoints in WCF 4

    (C#) Determining whether the current

    build mode is Debug or Release

    The Da i ly Ins ider

    30 free programming books

    Daily News: Signup now.

    http://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches (5 of 16) [3/13/2012 12:55:19 AM]

    http://www.codeproject.com/Tips/323990/How-to-Create-watermarked-images-in-Csharp-ASP-NET.aspxhttp://www.codeproject.com/Articles/324010/What-s-new-in-WCF-4-5-Improved-streaming-in-IIS-ho.aspxhttp://www.codeproject.com/Articles/324010/What-s-new-in-WCF-4-5-Improved-streaming-in-IIS-ho.aspxhttp://www.codeproject.com/Articles/324010/What-s-new-in-WCF-4-5-Improved-streaming-in-IIS-ho.aspxhttp://www.codeproject.com/Articles/324010/What-s-new-in-WCF-4-5-Improved-streaming-in-IIS-ho.aspxhttp://www.codeproject.com/Articles/324011/Creating-your-own-customized-standard-endpoints-in.aspxhttp://www.codeproject.com/Articles/324011/Creating-your-own-customized-standard-endpoints-in.aspxhttp://www.codeproject.com/Tips/324152/Csharp-Determining-whether-the-current-build-mode-.aspxhttp://www.codeproject.com/Tips/324152/Csharp-Determining-whether-the-current-build-mode-.aspxhttp://citizen428.net/archives/434http://www.codeproject.com/Feature/Insider/http://www.codeproject.com/Feature/Insider/http://citizen428.net/archives/434http://www.codeproject.com/Tips/324152/Csharp-Determining-whether-the-current-build-mode-.aspxhttp://www.codeproject.com/Tips/324152/Csharp-Determining-whether-the-current-build-mode-.aspxhttp://www.codeproject.com/Articles/324011/Creating-your-own-customized-standard-endpoints-in.aspxhttp://www.codeproject.com/Articles/324011/Creating-your-own-customized-standard-endpoints-in.aspxhttp://www.codeproject.com/Articles/324010/What-s-new-in-WCF-4-5-Improved-streaming-in-IIS-ho.aspxhttp://www.codeproject.com/Articles/324010/What-s-new-in-WCF-4-5-Improved-streaming-in-IIS-ho.aspxhttp://www.codeproject.com/Tips/323990/How-to-Create-watermarked-images-in-Csharp-ASP-NET.aspx
  • 8/2/2019 Application Architecture - Driving Forces, Approaches, And Implementation Co

    2/12

    Application Architecture - Driving Forces, Approaches, and Implementation Considerations - CodeProject

    Expec ted sca lab i l i t y and Pe r fo rmance

    Step 1: Identify support for OLAP/OLTP scenarios in the project. Step 2: Identify minimum response time requirements. Step 3: Weightage based on POCs constructed under various technologies or existing data or

    previous experience.

    I n te rna l expe r t i se ava i l ab il i t y

    Step 1: Weightage based on our internal expertise and resource availability. Step 2: Training costs incurred.

    Dr i v i ng f o rces

    First things first. I just need to break the myth that Application Architecture and Design is driven bytechnology. Technology should be chosen only to implement an architecture in the best possible way, andnot vice versa. Also, architecture, in my opinion, is an ongoing process. The objective of architecture is tobring the solution closer and closer to the user expectation, and to unify diverse systems toprovide standardization. Architecture is an ongoing process because, user expectations may change overtime, as users thrive for better systems, models, and better experiences.

    Some factors that may affect your architecture include

    Politics with-in/between the organizations and stake holders (believe me, this is one of the critical factors)

    Available resources and in-house expertise How the system is expected to be consumed, and deployment considerations Non functional requirements like Scalability, Availability, Performance, Security etc. Project related driving forces like Cost, Scope, Quality, and Time Re-usable components/entities available Various risk factors (like unseen client expectations and change requests)

    If you are an architect, you know that you are already squeezed up between one or more of the aboveforces. Here we go :)

    Pol i t ics

    Have you ever got involved in a migration project? You are on the receiving side!! In most cases, the guyson the other (legacy) side, i.e., the guys who are expected to support you in a big way by

    transferring knowledge about the existing system, are reluctant to do that. Simply because once themigration or take over is done, then they may go out of job, or they'll lose their significance in the organization.

    So, in the end, you are forced to move to the design phase without actually understanding the existingsystem to be migrated. An alternative might be going for an iterative model, but still this is just one exampleof how politics can be a major factor that affects your architecture.

    Ava i lab le resources and in - house exper t i se

    I believe that architecting a solution should be a team based activity. At least, there should be anarchitecture approval work flow to ensure that the architecture handles basic non-functional requirementslike scalability, extensibility, security etc.

    Building in-house expertise and documenting the success and failure factors are important so that expertise

    can be re-used. To do this, one suggested solution is to form focus groups, on areas like security,performance etc., to ensure that best practices are followed in the architecture and design. These teamsshould also evaluate the architectures of successfully implemented projects, to abstract best practices fromthe same. The success in re-using expertise across teams and building in-house expertise is a major factor

    http://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches (6 of 16) [3/13/2012 12:55:19 AM]

  • 8/2/2019 Application Architecture - Driving Forces, Approaches, And Implementation Co

    3/12

    Application Architecture - Driving Forces, Approaches, and Implementation Considerations - CodeProject

    that affects the final architecture.

    How t he sys tem is expec ted to be consumed, and dep loyment cons idera t ions

    How the system is expected to be consumed by users is another major factor that affects the final picture.Over a period of time, we have various considerations like Client Server, Distributed, Service Oriented etc.,to name a few.

    Examp le - 1 : You are expected to architect a web based system to show the current temperature to theuser (very simple, huh?). The user is expected to view the temperature using his browser, by visitingyour website. After a month, the client you are working for needs to sell this as a service to other websitestoo, so that other websites can also use their service and show the temperature in their web pages.

    Examp le - 2 : You are expected to architect a web based shopping cart. Right now, you may deploythe Presentation Layer (UI) and Business Layer together in one server (i.e., the web server andapplication server will be one box), but you have to provide an option so that in future, when the userload increases, the business logic can be deployed in another machine (a separate application server).

    Examp le - 3 : You are expected to architect a web based shopping cart. Right now, you may beusing application level caching. But in future, when your load increases, and when you go for a webfarm scenario, how do you make sure that the cache is shared across all servers?

    Non- func t iona l requ i rem ents l i ke Sca lab i l i t y , Ava i lab i li t y , Per fo rmance , Secur i t y e tc

    Non-functional requirements are orphan kids - ignored by both the clients and the delivery team. Often,a performance tuning initiative or security push initiative is kicked off only during the final phase of theproject, as a life saver.

    Though NFRs are mostly ignored, they are one of the critical factors that has a direct impact on choosingthe correct architecture. Wrong decisions are induced in architecture mostly because NFRs are ignored atearlier stages.

    As I mentioned earlier, focus groups can contribute in a big way, to ensure that NFRs are consideredproperly during each phase of the development life cycle.

    Pro jec t re la ted d r iv ing f o rces l i ke Cost , Scope , Qua l i t y , and T ime

    Some time back, when I was talking to one of my senior managers, he pointed out that it is not possible togive all the four decision factors (Cost, Scope, Quality, and Time) to the client to decide on. The clientis expected to compromise on one factor. It is not because the client has tocompromise. It is simplyimpossible to keep all these four decision factors as non-varying factors - when a project is considered. If

    some one chooses scope, quality, and time - then the cost will be the varying factor. If someone choosesScope, Quality, and Cost, time will be the varying factor.

    Unfortunately, this is not conveyed properly to the client, and the client will always end up choosing thecost, scope, and timeframe. As a result, this will hit the quality of the project - because quality is theonly remaining factor.

    The architect will end up in compromising on factors like extensibility and other NFRs, to meet deadlines.

    Reusab le components / En t i t ies ava i lab le

    Reusability is the key. Shameless reuse of quality components and best practices should be enforced inthe design and architecture stage. The availability of reusable components, factories, and best practices isone major factor that affects the architecture.

    It is the responsibility of the organization to ensure that experience and best practices aredocumented, transferred, and reused properly.

    http://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches (7 of 16) [3/13/2012 12:55:19 AM]

  • 8/2/2019 Application Architecture - Driving Forces, Approaches, And Implementation Co

    4/12

    Application Architecture - Driving Forces, Approaches, and Implementation Considerations - CodeProject

    Unseen c l ien t expec ta t ions and change reques ts

    One major success criteria for an architecture is, it should not break when new changes areaccommodated. Having said that, this is not the case in most scenarios. These days, most companies arevery agile in their strategies. Hence, client companies may raise change requests often - which are triggereddue to the changes in their business model.

    The requirement analysis may miss out client expectations, which may cause serious architecture levelissues later. Even worse, the clients may expect the product to satisfy all their needs, by default.These expectations may also trigger change requests later.

    A pproach - T he though t p rocess

    Assume that once you have the bird's eye view of what needs to be done, a typical common starting point isto identify the tiers you need to have. For example, for a typical application, you may end up withsomething like:

    Collapse | Copy Code

    Data Tier Data Access Tier Business Tier Presentation Logic Tier GUI

    Now, a lot of questions will start arising. You'll start thinking about how these layers communicate witheach other, how the data is passed up and down, how the data is persisted, how the layers are connected etc.Of course, the answers depend largely on the requirements and other driving forces we discussed above.

    You might also think about various services you may use across tiers - like logging, caching etc.

    Along with this, you may also think about how factors like performance, availability, security etc., arerelevant and applicable in each layer.

    Tie rs in the sys tem

    Let us have a brief look at each of the tiers first. We'll go bottom up:

    Data t i e r

    The data tier is where you persist the data, mostly the database. The data tier expected toprovide functionalities like storage, retrieval, indexing, and querying of data. When you consider the data tier- as I mentioned earlier - it is important that factors like transaction support, scalability, availability,security etc., are considered.

    Data Access t ie r

    Here, you often have the stuff to interface with your data tier. Two major factors you may need to take careof are the scalability and response time. It is imperative that you should have proper strategies to makesure that the response time is good enough.

    For example, you may need to cache the data to avoid hitting the database each time. Another popularstrategy is to pool your connections to the database. Normally, the Data Access tier is stateless.

    Business t ie r

    Sure enough, your business tier is there to apply business rules and transformations on the data, and toperform calculations. You may include business rule based validations in your business tier. In mostscenarios, you might have a set of business objects for your business tier to operate on. Ideally, yourbusiness objects represent a domain specific model of your data.

    http://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches (8 of 16) [3/13/2012 12:55:19 AM]

  • 8/2/2019 Application Architecture - Driving Forces, Approaches, And Implementation Co

    5/12

    Application Architecture - Driving Forces, Approaches, and Implementation Considerations - CodeProject

    The business tier receives data from the presentation tier in the form of business objects, performsrequired business rule validations and transformations, and calls the required methods in the data access tierto perform operations like storing and fetching. In most cases you may need state management in thebusiness tier. For example, in a bookstore application, the business tier handles logic like adding books tothe cart, calculating total cost etc.

    It is certainly possible to implement services like caching and object pooling in the business tier also, basedon the scenario.

    Some other practical thoughts - from an architect's point of view, it is ideal to place all your business logic inthe business layer. But some times, you have to do some trade offs for performance - and move a little bit

    of business logic to your Stored Procedures :). This decision depends on several factors - The primary factoris the size of data your application is expected to process. However, the key is to make sure that yourStored Procedures can be ported to some other database platform in future, with minimum overhead.Most database platforms are well evolved - and can handle load much better than the best possiblebusiness layer design and algorithms you may decide to use, for processing data.

    Ideally, you should distribute the load wisely between all the tiers involved.

    Presen ta t i on Log i c t i e r

    The presentation logic tier handles the presentation logic. For example, for a web application, thepresentation tier holds ASP or JSP pages. For a Windows application, the presentation tier consists ofthe Windows Forms or something else the GUI layer is able to display.

    Again, the presentation logic tier may also implement services like caching. The page output caching forASPX pages is a good example.

    GUI

    The GUI is something the user interacts with. In a web application, the GUI is what the user sees in hisbrowser. It is interesting to understand why the presentation tier is actually split up to presentation logicand GUI. This is because, in some cases, the presentation logic sits on the server, and the GUI layer will beon the client side. This is particularly true in the case of a web application, where the ASP or JSP pagesare rendered and the resultant markup like HTML or WML is sent to the client

    A d i f fe ren t approach - Mode l V iew Cont ro l le r

    A common approach is to split an application to various tiers, as we just discussed above. However, a

    different approach is to view the entire application as a Model, View, and Controller (MVC architecturalpattern). This is particularly true for web applications. In this section, I am not going to explain MVC inside out- the intention is just to convey the message that MVC is an alternate way of modeling an application.

    http://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches (9 of 16) [3/13/2012 12:55:19 AM]

  • 8/2/2019 Application Architecture - Driving Forces, Approaches, And Implementation Co

    6/12

    Application Architecture - Driving Forces, Approaches, and Implementation Considerations - CodeProject

    The Model

    In MVC, the 'Model' represents the domain specific representation of data. MVC does not speak much abouthow the data access is performed with in the model - and the model is expected to wrap the data accessand object persistence.

    The V iew

    The Presentation tier in MVC is split up into the 'View' and the 'Controller'. The View is expected to renderthe Model in a meaningful way to the user. For example, in a web application, if you have a model whichconsists of a set of Employees, the logic in vthe iew may iterate through the employees and emit HTML codeto display the list of employees in the browser. It is perfectly possible that more views may exist for onemodel. I.e., the same employee collection can be rendered as a bulleted list by another view.

    The Contro l le r

    The Controller handles user actions and gestures, and responds to user events. For example, when a userclicks the 'new' button to add a new employee, the controller for that action is invoked. The controller willthen make changes to the employee model. The view will then render the modified employee model tothe display so that user can view the new employee he added in the employee list.

    In some MVC implementations, the business logic is wrapped in the Model, and is perfectly possible. Onthe other hand, some developers may choose to implement business logic in the event handlers withinthe controller. It is left to the developer to decide where he has to put the business logic.

    A few add i t i ona l no tes : In the Web Client Software factory released by the P&P group in Microsoft,they introduced a variant - Model View Presenter. But it seems that Microsoft is heading for a pure ModelView Controller framework for ASP.NET. See Scott's blog entry regarding the same for some interesting reading.

    Im p lem en ta t i on cons i de ra t i ons

    http://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches (10 of 16) [3/13/2012 12:55:19 AM]

    http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspxhttp://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx
  • 8/2/2019 Application Architecture - Driving Forces, Approaches, And Implementation Co

    7/12

    Application Architecture - Driving Forces, Approaches, and Implementation Considerations - CodeProject

    The next step is to consolidate all your 'architecture thoughts' to form a high level wire frame (in yourmind). Don't confuse this with high level design. Even before you begin the high level design, you shouldhave answers for some of the basic questions. For example, here is a subsetof questions you may end upasking yourself:

    What are the dependencies for the tiers involved? How are the tiers plumbed to each other? Where are the extension points? What all services should I use, and where? What are my persistence mechanisms?

    Dependencies fo r t he t ie rs invo lved

    We discussed the tiers involved in the system - but still, we are not close enough to real world scenarios.For example, in the above definition of the business tier, we mentioned that the business tier is placedbetween the data access tier and the presentation tier.

    However, in a real world scenario, your business tier may be connected to some other sub systems - i.e.,your business tier may be subscribing other services for rule processing. For example, if you are developinga flight ticket booking system, your business tier will be communicating with various Web Servicesfor performing operations like querying flight timing, booking a ticket etc. In such scenarios, you may needto use facades to access your sub systems and to hide the complexity of your sub systems

    Another common scenario is you may need to separate the logic of finding the dependency between twolayers from your actual implementation. For an example, assume that you need to invoke a Web Service tobook a ticket from your application. The job of identifying "which" service to use and "where" to locate

    the service can be separated from your application, using techniques like dependency injection. Yourapplication may know only "how" to communicate with the service. To give a simple scenario - you mayconsider injecting the dependency of the ticket booking Web Service to your business layer class.

    There are various ways to inject dependency, and one way is property based dependency injection.Your business layer class may have a property with type ITicketBookingService . When this business

    layer class is instantiated, an instance of the proxy class (sure enough, this proxy class should implementyour ITicketBookingService interface) of the ticket booking Web Service you need to use is created

    and assigned (injected) to this property. A detailed discussion of DI is out of the scope of this article. TheSpring.NET framework provides excellent dependency injection capability. Also, Microsoft ObjectBuilder (whichis used in factories like web client software factory) can be used for the same. (I still wonder why there isno separate 'Dependency Injection Application Block' in the Enterprise Library.)

    How t he t ie rs a re p lumbed to each o ther

    Let us start with an example. Right now, you are developing a web application, and you have yourpresentation layer consuming your business layer classes directly. You simply create an object of yourbusiness layer class in the code-behind of your ASPX page, and call methods in your business layer objectto pass data up and down. The development and QA is almost over, and you are waiting for the approvalto move the project to production.

    One fine morning, you find a mail in your inbox from you technical manager - saying something like "Dude,let us move the application to production. But to maintain the load, we'll deploy the presentation tier in theweb server, and the business logic in a separate app server." You are in a soup, because your architecturedoes not support distributed logic - and you simply can't deploy both these layers separately.

    Hence, as I mentioned earlier, it is imperative to consider factors like this during the initial stage. Onecommon approach to build distribution of logic into the picture is bringing in a proxy tier, between the layers.

    For example, you may put a proxy tier between the business tier and the presentation logic tier. The objectiveof the proxy tier is to expose the functionalities of one tier, so that the next tier can access it - to facilitatethe need of distributed computing:

    http://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches (11 of 16) [3/13/2012 12:55:19 AM]

  • 8/2/2019 Application Architecture - Driving Forces, Approaches, And Implementation Co

    8/12

    Application Architecture - Driving Forces, Approaches, and Implementation Considerations - CodeProject

    Collapse | Copy Code

    Business Tier Proxy Tier Presentation Logic Tier

    You may use protocols like SOAP, RMI, DCOM, CORBA, etc., for your proxy tier, based on the scenario.For example, if the presentation logic tier and business tier are developed in .NET, and both are expected tobe deployed in the same LAN, you may go for .NET Remoting. If the business logic needs to be exposedas services and needs to be accessed outside the enterprise domain by heterogeneous clients, you may gofor SOAP, and so on.

    When you use classic remoting technologies, like DCOM and RMI, the contract (methods and data types usedby those methods) between two tiers is pre-defined. How ver, in Service Oriented Systems, the client

    can dynamically discover the contract to use the same. For example, a Web Service will expose its contractusing Web Service Description Language (WSDL), which provides efficient decoupling.

    Sometimes, you may need to go for defining separate data contracts or data transfer objects (DTOs) that canbe send out and received back by the proxy tier. Then, internally, the proxy tier needs to convert theDTO objects to Business Objects, and vice versa. Though this conversion is an overhead, this makes surethat the contract won't break even if your domain object model is changed.

    Where a re the ex tens ion po in ts?

    Ideally, your application should have enough extension points wherever possible. For example, if youare communicating to three services for a single purpose, tomorrow you should be able to add a fourthservice to your application without any code change in the core framework.

    A classic way of doing this is using the Provider pattern to define extensibility points. Using a providerbased approach will also help you to solve various scaling issues in future. For example, assume that youare caching data in your web application. Normally, you use the default cache, which can cache data only inthe current application domain. Tomorrow, if you are moving to a web farm scenario, where you have to usea shared/replicated cache between your web servers, you are in a soup. So, when you consider using acache, you may consider using a provider model, so that you can change the cache provider at a later stageif required. Another example is, making certain parts of your system plug-in based.

    You may even go for a configuration file based provider model. From .NET 2.0 onwards, ASP.NET givesprovider based extensibility for various functionalities like membership management, role management, etc.I've wrote an article a long time back about creating a simple custom provider framework[^]. You might

    also have a look at the Microsoft Provider Toolkit here[^].

    http://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches (12 of 16) [3/13/2012 12:55:19 AM]

    http://amazedsaint-articles.blogspot.com/2007/03/learn-how-to-build-provider-framework.htmlhttp://amazedsaint-articles.blogspot.com/2007/03/learn-how-to-build-provider-framework.htmlhttp://msdn2.microsoft.com/en-us/asp.net/Aa336558.aspxhttp://msdn2.microsoft.com/en-us/asp.net/Aa336558.aspxhttp://msdn2.microsoft.com/en-us/asp.net/Aa336558.aspxhttp://msdn2.microsoft.com/en-us/asp.net/Aa336558.aspxhttp://amazedsaint-articles.blogspot.com/2007/03/learn-how-to-build-provider-framework.htmlhttp://amazedsaint-articles.blogspot.com/2007/03/learn-how-to-build-provider-framework.html
  • 8/2/2019 Application Architecture - Driving Forces, Approaches, And Implementation Co

    9/12

    Application Architecture - Driving Forces, Approaches, and Implementation Considerations - CodeProject

    You may also be interested to see how the Microsoft Enterprise Library uses the provider concept forproviding configuration file driven features.

    Deciding where you have the extension points during the initial stage itself is the key to ensure extensibility.

    What se rv ices shou ld I use , and w here?

    Various services like caching, logging, security (authentication and authorization), etc., needs to be usedin multiple tiers. This decision is pretty critical, mainly to ensure that various non-functional requirementsare met properly. As the stake holders might not be even aware about the overhead required to implementsuch services, it is pretty important to communicate the same to the stake holders during the initial phase itself.

    The key is re-usability. Most of these services are common to projects. Hence, if you have an organizationlevel framework which consists of these services, it is going to reduce the overhead in a big way.

    What a re t he pers is tence mechan isms?

    Persisting data and querying it back is a major consideration. Some people prefer using ORM (ObjectRelational Mapping) frameworks like Hibernate or NHibernate (the .NET port of Hibernate) - www.nhibernate.

    org[^] - others may follow the classic way of writing Stored Procedures and then using data tier classes

    to consume them.

    Subsonic[^] is a .NET framework which provides an ActiveRecord kind of mechanism, much like the Ruby

    On Rails framework.

    Another approach is to generate strongly typed classes based on database tables, using some codegeneration technique. Microsoft Web Service software factory provides a few functionalities like this. Also,there are other code generators or meta coding frameworks - I've used My Generation[^] earlier in a couple

    of projects.

    Conclusion

    We just discussed some driving forces, approaches, and considerations involved in architecting a newsystem. This is in no way a complete list - the whole objective is to help you analyze the thoughtprocess involved in architecting a solution.

    As a next step, you may read my article on identifying entities and design problems in a system, to solve

    them by applying various Design Patterns. Cl i ck he re to r ead tha t .

    Visit my website http://amazedsaint.blogspot.com- for more articles, and .NET and Design Patterns recipes.

    Also, he re is a list of my other articles published in CodeProject.

    License

    This article, along with any associated source code and files, is licensed under The Code Project Open

    License (CPOL)

    A bou t t he A u tho r

    http://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches (13 of 16) [3/13/2012 12:55:19 AM]

    l h h d l C d C d

    http://www.nhibernate.org/http://www.nhibernate.org/http://www.nhibernate.org/http://www.subsonicproject.com/http://www.subsonicproject.com/http://www.mygenerationsoftware.com/http://www.mygenerationsoftware.com/http://amazedsaint-articles.blogspot.com/2006/03/design-your-soccer-engine-and-learn.htmlhttp://amazedsaint-articles.blogspot.com/2006/03/design-your-soccer-engine-and-learn.htmlhttp://amazedsaint.blogspot.com/http://www.codeproject.com/script/articles/list_articles.asp?userid=1117033http://www.codeproject.com/info/cpol10.aspxhttp://www.codeproject.com/info/cpol10.aspxhttp://www.codeproject.com/info/cpol10.aspxhttp://www.codeproject.com/info/cpol10.aspxhttp://www.codeproject.com/script/articles/list_articles.asp?userid=1117033http://amazedsaint.blogspot.com/http://amazedsaint-articles.blogspot.com/2006/03/design-your-soccer-engine-and-learn.htmlhttp://www.mygenerationsoftware.com/http://www.mygenerationsoftware.com/http://www.subsonicproject.com/http://www.subsonicproject.com/http://www.nhibernate.org/http://www.nhibernate.org/http://www.nhibernate.org/
  • 8/2/2019 Application Architecture - Driving Forces, Approaches, And Implementation Co

    10/12

    Application Architecture - Driving Forces, Approaches, and Implementation Considerations - CodeProject

    Anoop

    Madhusudanan

    Architect

    India

    Member

    Follow on Twitter

    Microsoft MVP | Architect, Trainer Blogger, Speaker | Exp in Silverlight, WPF, ASP.NET, Cloud | R&D in UX,AI, HDI, GA | Husband, Son, Father.

    Fo l l ow :I'm In Twitter @amazedsaint | Blog: http://amazedsaint.com

    HTML5 is on a killer spree, Web Sockets May partially kill HTTP as well

    Command Query Responsibility Segregation, REST and related thoughts

    7 Freely Available Ebooks For .NET developers

    5 Back to Basics C# Articles - Fluent Interfaces, Expr Trees etc

    3 Gems from Mono to spice up your .NET Apps

    Top 5 Common Mistakes .NET Developers Must Avoid

    6 Cool VS2010 Tips you may find interesting

    4 .NET 4.0 Libraries you *should* know about

    Article Top Sign Up to

    votePoor Excellent

    Com men ts and D iscussions

    You mus t S ign I n to use t h i s message boa rd . (secure sign-in)

    Search th is forum

    Profile popups Noise Layout Per page

    Refresh FirstPrevNext

    I gu ess the ques t i on we need to ask i s how many S tanda rd "F ramew orks" do w e need? Gr i f f inPeter 3 :04 9 Dec ' 08

    I guess the question we need to ask is how many Standard "Frameworks" do we need? Not a day goes by

    that someone on here is promoting one or another..

    One of my colleagues says, if it has been done already in one framework, why bother writing your ownto achieve what has already been done?

    Sign InView ThreadPermalink

    Re: I guess the question we need to ask is how many Standard "Frameworks" do we need?An 'OOP'

    Madhusudanan

    6:25 9 Dec '08

    http://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches (14 of 16) [3/13/2012 12:55:19 AM]

    Vote

    Go

    Medium Normal 10 Update

    A li ti A hit t D i i F A h d I l t ti C id ti C d P j t

    http://www.codeproject.com/Members/amazedsainthttp://www.codeproject.com/Members/amazedsainthttp://www.twitter.com/amazedsainthttp://twitter.com/amazedsainthttp://amazedsaint.com/http://www.amazedsaint.com/2011/11/html5-is-in-killer-spree-may-kill-http.htmlhttp://www.amazedsaint.com/2011/11/html5-is-in-killer-spree-may-kill-http.htmlhttp://www.amazedsaint.com/2011/11/html5-is-in-killer-spree-may-kill-http.htmlhttp://www.amazedsaint.com/2011/11/html5-is-in-killer-spree-may-kill-http.htmlhttp://www.amazedsaint.com/2011/11/html5-is-in-killer-spree-may-kill-http.htmlhttp://www.amazedsaint.com/2011/11/cqrs-dilemma-and-related-random.htmlhttp://www.amazedsaint.com/2010/09/7-freely-available-e-booksguides-i.htmlhttp://www.amazedsaint.com/2010/10/5-interesting-c-articles-fluent.htmlhttp://www.amazedsaint.com/2010/10/monocsharp-monocecil-and.htmlhttp://www.amazedsaint.com/2010/02/top-5-common-programming-mistakes-net.htmlhttp://www.amazedsaint.com/2010/04/6-cool-vs2010-quick-tips-you-should.htmlhttp://www.amazedsaint.com/2010/05/4-net-40-libraries-you-should-know.htmlhttp://-/?-http://-/?-http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approaches%2f%3ffid%3d853511https://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approaches%2f%3ffid%3d853511http://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511http://www.codeproject.com/Messages/2837034/I-guess-the-question-we-need-to-ask-is-how-many-St.aspxhttp://www.codeproject.com/script/Membership/View.aspx?mid=467040http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2837034http://www.codeproject.com/Messages/2837034/I-guess-the-question-we-need-to-ask-is-how-many-St.aspxhttp://www.codeproject.com/Messages/2837326/Re-I-guess-the-question-we-need-to-ask-is-how-many.aspxhttp://www.codeproject.com/script/Membership/View.aspx?mid=1117033http://www.codeproject.com/script/Membership/View.aspx?mid=1117033http://www.codeproject.com/script/Membership/View.aspx?mid=1117033http://www.codeproject.com/script/Membership/View.aspx?mid=1117033http://www.codeproject.com/Messages/2837326/Re-I-guess-the-question-we-need-to-ask-is-how-many.aspxhttp://www.codeproject.com/Messages/2837034/I-guess-the-question-we-need-to-ask-is-how-many-St.aspxhttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2837034http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://www.codeproject.com/script/Membership/View.aspx?mid=467040http://www.codeproject.com/Messages/2837034/I-guess-the-question-we-need-to-ask-is-how-many-St.aspxhttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511http://www.codeproject.com/KB/FAQs/MessageBoardsFAQ.aspxhttps://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approaches%2f%3ffid%3d853511http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approaches%2f%3ffid%3d853511http://-/?-http://-/?-http://www.amazedsaint.com/2010/05/4-net-40-libraries-you-should-know.htmlhttp://www.amazedsaint.com/2010/04/6-cool-vs2010-quick-tips-you-should.htmlhttp://www.amazedsaint.com/2010/02/top-5-common-programming-mistakes-net.htmlhttp://www.amazedsaint.com/2010/10/monocsharp-monocecil-and.htmlhttp://www.amazedsaint.com/2010/10/5-interesting-c-articles-fluent.htmlhttp://www.amazedsaint.com/2010/09/7-freely-available-e-booksguides-i.htmlhttp://www.amazedsaint.com/2011/11/cqrs-dilemma-and-related-random.htmlhttp://www.amazedsaint.com/2011/11/html5-is-in-killer-spree-may-kill-http.htmlhttp://amazedsaint.com/http://twitter.com/amazedsainthttp://www.twitter.com/amazedsainthttp://www.twitter.com/amazedsainthttp://www.codeproject.com/Members/amazedsainthttp://www.codeproject.com/Members/amazedsaint
  • 8/2/2019 Application Architecture - Driving Forces, Approaches, And Implementation Co

    11/12

    Application Architecture - Driving Forces, Approaches, and Implementation Considerations - CodeProject

    Once you are good enough to create one standard framework yourself, you can go an re-use any ofthose existing ones if a suitable 'framework' is there . lol

    ------------------------:::: An 'OOP' ::::Visit Delicious .NET Recipes

    Sign InView ThreadPermalink

    Re: I guess the question we need to ask is how many Standard "Frameworks" do we need? GriffinPeter 10:56 9 Dec '08

    you may be good enough to create one standard framework, but what is the point spending the time i f thereis one already out there to suit your task?

    Sign InView ThreadPermalink

    ABOUT FRAMEWORKSWAPNI L

    MAHAWADIWAR

    19 :21 6 May ' 08

    HI MY NAME SWAPNIL I AM JUNIER PROGRAMMER OF SP TECHNOLOGY PUNE,I DEVELOP A FRAMEWORK FOR C#.NET. AND MY PROBLEM IS THAT I GENERATE THE DYNAMIC TOOLBARAND IT SHOULD BE ONLY ONE MEANS ALL WINDOWES SHOULD ACCESS ALL OPERATION OF SAVE,ADD,DELETE ETC. MY PROBLEM IS THAT HOW CAN I SEND THE REFERNCE OF ALL CONTROLS OF THEFORM DYNAMICALLY. PLEASE SEBD ME REPLY ON MY ID: [email protected]

    Sign InView ThreadPermalink 1.00/5 (1 vote)

    Re: ABOUT FRAMEWORK GriffinPeter 3:05 9 Dec '08

    See my message above and consider using an existing framework which supports this b4 writing your own

    Sign InView ThreadPermalink

    The A rch i tec tu re P i c tu re Bernhard E lb l 10 :02 15 Nov ' 07

    The picture describing the "Model View Controller" is nice. What software did you use to create that kindof architecture picture? Visio?

    Sign InView ThreadPermalink

    Re: The Architecture Picture Fernando Armburu 3:35 20 Nov '07

    I guess the picture is the most beautiful and most used MVC picture. It comes from sun website (http://java.

    sun.com/blueprints/guidelines/designing_enterprise_applications_2e/images/app-archa2.gif) .

    I know that because I used it on my thesis about an ASP.NET MVC implementation.

    Hope this help.

    Fernando [email protected]

    Sign InView ThreadPermalink

    Re: The Architecture PictureAn 'OOP'

    Madhusudanan

    21:05 20 Nov '07

    http://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches (15 of 16) [3/13/2012 12:55:20 AM]

    Application Architecture Driving Forces Approaches and Implementation Considerations CodeProject

    http://amazedsaint.blogspot.com/http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2837034http://www.codeproject.com/Messages/2837326/Re-I-guess-the-question-we-need-to-ask-is-how-many.aspxhttp://www.codeproject.com/Messages/2837677/Re-I-guess-the-question-we-need-to-ask-is-how-many.aspxhttp://www.codeproject.com/script/Membership/View.aspx?mid=467040http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2837034http://www.codeproject.com/Messages/2837677/Re-I-guess-the-question-we-need-to-ask-is-how-many.aspxhttp://www.codeproject.com/Messages/2540255/ABOUT-FRAMEWORK.aspxhttp://www.codeproject.com/script/Membership/View.aspx?mid=4980910http://www.codeproject.com/script/Membership/View.aspx?mid=4980910http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2540255http://www.codeproject.com/Messages/2540255/ABOUT-FRAMEWORK.aspxhttp://www.codeproject.com/Messages/2837037/Re-ABOUT-FRAMEWORK.aspxhttp://www.codeproject.com/script/Membership/View.aspx?mid=467040http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2540255http://www.codeproject.com/Messages/2837037/Re-ABOUT-FRAMEWORK.aspxhttp://www.codeproject.com/Messages/2321004/The-Architecture-Picture.aspxhttp://www.codeproject.com/script/Membership/View.aspx?mid=201317http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2321004http://www.codeproject.com/Messages/2321004/The-Architecture-Picture.aspxhttp://www.codeproject.com/Messages/2327163/Re-The-Architecture-Picture.aspxhttp://www.codeproject.com/script/Membership/View.aspx?mid=876716http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2321004http://www.codeproject.com/Messages/2327163/Re-The-Architecture-Picture.aspxhttp://www.codeproject.com/Messages/2328390/Re-The-Architecture-Picture.aspxhttp://www.codeproject.com/script/Membership/View.aspx?mid=1117033http://www.codeproject.com/script/Membership/View.aspx?mid=1117033http://www.codeproject.com/script/Membership/View.aspx?mid=1117033http://www.codeproject.com/script/Membership/View.aspx?mid=1117033http://www.codeproject.com/Messages/2328390/Re-The-Architecture-Picture.aspxhttp://www.codeproject.com/Messages/2327163/Re-The-Architecture-Picture.aspxhttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2321004http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://www.codeproject.com/script/Membership/View.aspx?mid=876716http://www.codeproject.com/Messages/2327163/Re-The-Architecture-Picture.aspxhttp://www.codeproject.com/Messages/2321004/The-Architecture-Picture.aspxhttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2321004http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://www.codeproject.com/script/Membership/View.aspx?mid=201317http://www.codeproject.com/Messages/2321004/The-Architecture-Picture.aspxhttp://www.codeproject.com/Messages/2837037/Re-ABOUT-FRAMEWORK.aspxhttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2540255http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://www.codeproject.com/script/Membership/View.aspx?mid=467040http://www.codeproject.com/Messages/2837037/Re-ABOUT-FRAMEWORK.aspxhttp://www.codeproject.com/Messages/2540255/ABOUT-FRAMEWORK.aspxhttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2540255http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://www.codeproject.com/script/Membership/View.aspx?mid=4980910http://www.codeproject.com/script/Membership/View.aspx?mid=4980910http://www.codeproject.com/Messages/2540255/ABOUT-FRAMEWORK.aspxhttp://www.codeproject.com/Messages/2837677/Re-I-guess-the-question-we-need-to-ask-is-how-many.aspxhttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2837034http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://www.codeproject.com/script/Membership/View.aspx?mid=467040http://www.codeproject.com/Messages/2837677/Re-I-guess-the-question-we-need-to-ask-is-how-many.aspxhttp://www.codeproject.com/Messages/2837326/Re-I-guess-the-question-we-need-to-ask-is-how-many.aspxhttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2837034http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://amazedsaint.blogspot.com/
  • 8/2/2019 Application Architecture - Driving Forces, Approaches, And Implementation Co

    12/12

    Application Architecture - Driving Forces, Approaches, and Implementation Considerations - CodeProject

    You are right Fernado. This image is very self explanatory, and is used widely for describing MVC

    ------------------------:::: An 'OOP' ::::Visit AmazedSaint Tech Blogs for tech articles & code

    Sign InView ThreadPermalink

    Last Visit: 19:00 31 Dec '99 Last Update: 10:23 12 Mar '12 1

    General News Suggestion Question Bug Answer Joke Rant Admin

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    Permalink | Advertise| Privacy | Mobile

    Web04 | 2.5.120310.1 | Last Updated 9 Dec2008

    Article Copyright 2007 by Anoop MadhusudananEverything else Copyright CodeProject, 1999-

    2012Terms of Use

    Layout:fixed | fluid

    http://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches (16 of 16) [3/13/2012 12:55:20 AM]

    http://amazedsaint.blogspot.com/http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2321004http://www.codeproject.com/Messages/2328390/Re-The-Architecture-Picture.aspxhttp://lakequincy.com/http://www.codeproject.com/info/privacy.aspxhttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?display=Mobilemailto:[email protected]://www.codeproject.com/info/TermsOfUse.aspxhttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?PageFlow=FixedWidthhttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?PageFlow=FixedWidthhttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?PageFlow=Fluidhttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?PageFlow=Fluidhttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?PageFlow=FixedWidthhttp://www.codeproject.com/info/TermsOfUse.aspxmailto:[email protected]://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?display=Mobilehttp://www.codeproject.com/info/privacy.aspxhttp://lakequincy.com/http://www.codeproject.com/Messages/2328390/Re-The-Architecture-Picture.aspxhttp://www.codeproject.com/Articles/21313/Application-Architecture-Driving-Forces-Approaches/?fid=853511&tid=2321004http://www.codeproject.com/script/Membership/LogOn.aspx?rp=%2fArticles%2f21313%2fApplication-Architecture-Driving-Forces-Approacheshttp://amazedsaint.blogspot.com/