Posts Tagged ‘MVC’
DevReach 2009, Bulgaria
I have attended DevReach’2009: Microsoft technologies at your reach (12-13 October).
Modeling: Here and Now by Chris Sells, Connecting to the Clouds: The Azure Services Platform by Luka Debeljak, From One Web Server to Two: Making the Leap by Richard Campbell, Being Productive with ASP.NET MVC by Hadi Hariri, SQL Server Intelligence by Remi Caron, Fun with Garbage Collection by Ed Musters at the first day of sessions of the conference. And the next day I have attended Practical Parallel Programming with Visual Studio 2010 by Tiberiu Covaci, SOLID Design Principles by Hadi Hariri, Building Data Visualization Applications with WPF by Tim Huckaby, Will It Blend? Building Websites with All Flavors of ASP.NET by Todd Anglin, SharePoint Web Part Development (Deep Dive) by Ed Musters, and The Daily Scrum by Stephen Forte & Remi Caron.
These are my notes listed by sessions:
Modeling: Here and Now There exist types of data models, 3 in count: graph (generally used for programming- behaviour), tree (generally used for transmission- interop), relational (generally used for storage- permanence). Re-factoring DB in VS is a very powerful feauture which requires only the schemas of the DB.
Connecting to the Clouds: The Azure Services Platform The vision of Microsoft was Software + Service which is applied in the Azure Services Platform. The Cloud is an additional platform, a hosted software platform, a shared infrastructure, it is virtualized and dynamic, and you pay as you use it. The Cloud is close to an infinite amount of computer power and is flexible. The Azure Platform consists of blobs, tables, and queus. Blobs is a file system with meta about the files where Web Apps are placed as executables. Tables are DB tables. Queus are tunels for application communication- Service Bus is suppposed to take place here. Nice whitepapers about Azure can be found at davidchappell.com.
From One Web Server to Two: Making the Leap The reason for adding web server is actually reliability. Configurations between web servers must be identical. Single affinity in network configuration refers to sending requests from on visitor IP always to one and the same server in the farm. The letter is important for web sessions saving. Single affinity increases the network traffic by 10%. Google says over 3 sec. for page loading makes you lose visitors.
Being Productive with ASP.NET MVC MVC is about Convention over Configuration assuming certain things. M (the model) is missing in APS.NET MVC, it is replaced by ViewModel and normally 1:1 ViewModel and View relation. One way to implement aspect-oriented programming is by action filters. For complex views (like homepage) the main view calls Controllers to render by pointing where to render their views in the first.
SOLID Design Principles – Single Responsibility Principle: the more we touch, the more bugs can born; A class should have only one reason to change. – Open Closed Principle: A class should be open for extension but closed for change; This is solved by polymorphism, and avoiding switch statements in general. – Liskov Substitution Principle: if S is a subtype of T, then objects of type T in a program may be replaced with objects of type S without altering any of the desirable properties of that program. – Interface Segregation Principle: the interface is a contract and if you do not implement a function from an interface you are breaking the contract; Clients are supposed to depend on methods that they do not use. – Dependency Inversion Principle: Program to an Interface, not a Class; Use IoC containers. At objectmentor.com are many more principles.
The Daily Scrum In Harvard Business Review before 20 years the idea is first explained that people lose ‘relay race’ if work in issolation. Scrum is an agile process that focuses on communication. Expose problems fundamental to your organization and enable you to fix them earlier. Make small 2 week sprints ending with presenting everything to the client. This way making the client an active member of the team. Separate the basic job types in small things and work on small parts from all types in order to have a solution ready for presentation at the client.
I was able to have talks with a few speakers and present to them my visions which can be found in this blog, too. I have made few friendships with attendees, too. One of the greatest benefits was to meet live with attendees and presenters at the coffee breaks.
java.lang.ref.* in GoogleWebToolkit ?
Is java.lang.ref.* functioning in GWT? I come to an idea that java.lang.ref.* is necessary to enable proper garbage collection while implementing the Observer pattern in Model View Controller.
I was writing a big Java code for GWT for my school final project to make a program that at that days was modern to call Rich Internet Applications (RIA). I have implemented the full MVC by making the model to be a fully functional object (at that time only a Bean object carrier but able to implement business logic if having this need in future) which updates by request to the server made in a definite period of time. I have enabled different views to edit at one time one object by implementing the Observer pattern. After I have finished the project I realized that a newly created view will never be collected by the garbage collector because always its model has a reference to it in order to update it when an update is received from the server.
Now I think that by implementing java.lang.ref.* in the client side (translating to written by hand JavaScript code that adds and can manages new type of object references) many people can avoid their own implementation of object release algorithm used to classify the significant (regular) and not significant (which do not require object existance at all) object references.
Link to GoogleWebToolkit Discussion Forum thread on “java.lang.ref.* in GoogleWebToolkit ?”.
Garbage collection in Java and design patterns http://garabedyan.wordpress.com/2008/01/08/garbage-collection-in-java-and-design-patterns/