Goal of the Project Product Dynamic Content Easy Administration Development Layered Architecture Object Oriented Adaptive to HTML design change Scalable
Data Driven Dynamic Content All data stored in the database Relationships between Issue/Section/Article Status (Draft/Approved/Published/Featured)
Administration Interface User-based Individual Editors can Add/Edit their own articles Administrators can manage all articles, publish articles to sections/issues or featured.
Development Layer Architecture Different Developers can work in different layers. Isolate changes within a layer Object Oriented Model business entities (e.g. articles) Simpler code for developers to understand
Developer vs. Designer Look and Feel designed by HTML designer Developers take design to implement Designer may change design (different style, extra field, etc) later on Developers must make sure changes can be easily done
Component Based Architecture Objects make sure information is available to every component Code-Behind of ASP.NET separates presentation from logic Avoid spaghetti code User control enables reuse of common modules
Scalability Request from Database on every page Section List Article List Article Details Takes time to establish connection and load data Connection Pooling and Buffer Manager helps But we still want to minimize connection to database
Object Caching Take advantage of the fact that: Once an article is published, it seldom changes Data in general stay the same within issue Use caching to keep object in memory Once an object is cached in one component, it is accessible to other components
More Scalability What if the magazine gets VERY popular? Web Farm Deploy Application to different servers Use switch to redirect request to a server But we got a problem….
Data Inconsistency If an article is updated. Cached copy has to be invalidated. Simple Picture Database, Administration Interface and Public site are all the same machine Cache can be cleared after data update. What about web farm?
Remote Cache Invalidation With the use of Web Service Each deployed application has an exposed web service to invalidate the cache List of services stored in configuration file When the database is updated through the administration interface, a remote service call is sent to each application
Room for Improvements Things that can be done given more time Advanced Search Static Content Editor Advertisements Things that should be done Lists of Articles for caching Separate administration page for lists Enable cache to be invalidated separately
Article Lists Improvement Article table does not contain issue and section information Maintain list of featured articles, articles in sections Whenever list is updated, that cached list is invalidated but the articles themselves are not
Conclusion Data-Driven application Development adaptive to change Scalability