Posted in December 26, 2009 ¬ 11:21 amh.Ning Zhao
Many developers wonder whether there were any benefits of using IoC Pattern over Plug-in Pattern when designing their enterprise application using N-Layered architecture, here is my take on this question.
Now picture that you are implementing a Service Layer that coordinates the operations of the Business Logic and Data Access, in order to ensure that the Data Access objects are loosely coupled to the Service Layer you need to employ a strategy for returning the concrete implementation of the Data Access objects. 2 of the most popular design patterns to choose from in this scenario are Plug-in Pattern and Inversion of Control Pattern (more specifically the Dependency Injection of IoC pattern). There are 2 clear advantages of Dependency Injection over the Plug-in pattern, they are:
- Code Clarity – In the case of Injection via Constructor, you are aware of the reference that is needed right from the beginning of your service class. In the case of Plug-in Pattern you would need to carefully inspect the code of the Factory method code to gain this knowledge which makes your code a bit less obvious to developers.
- Loose Coupling – By using Dependency Injection (via constructor, setter etc.) your class library is loosely coupled to the method that returns the concrete implementation. This is particular useful when you are developing code that can be consumed by third-party objects: the concrete references can be injected without your prior knowledge of the Factory method / framework. Whereas by using Plug-in pattern your Service Layer code is tightly coupled to the Factory method that is responsible for returning the concrete data access implementation hence much less flexibility.
Posted in July 14, 2009 ¬ 10:26 amh.Ning Zhao
After going through a fairly quick Beta process Microsoft has released the final production version of Silverlight 3.0 into the wild. The latest version features a number of improvements over the previous version, you can find more details about these improvements here.
It seems that Microsoft has gone far in an effort to dent the market share of Adobe Flash in the rich-media delivery arena with features like 720p true HD smooth video streaming and GPU acceleration. Another highlight is the new out-of-the-browser feature which means now a user can safely install web applications on her local machine which can be used both in online and offline mode, does that mean Silverlight 3.0 is finally closing the gap between the online and offline platforms?
There are 60+ new controls with source code built-in to the framework which makes the total number of user controls available to over 100. With a massive .Net developer community out there and the new features introduced in this latest version, could it finally be the time to see Microsoft winning the fight over Adobe? I suppose we will have to wait and see.
Posted in July 13, 2009 ¬ 12:07 amh.Ning Zhao
I picked up another interesting point today when I was listening to talks about Web 2.0 produced by ThoughtWorks (who I had the pleasure to work with recently). It is increasingly impractical to develop new software projects and new features by using external suppliers due to the rapid shift from the traditional software delivery to the Web 2.0 trend. This is particular so to new businesses whose primary products are SaaS focused and organisations trying to transform their traditional IT models into Web 2.0 and Enterprise 2.0.
Having a team inside an organisation to see through a product from its initiation stage through development life cycles give much greater benefits to the business because that the team is the expert of the product not only during its development, testing and delivery stages but also for maintaining the system and, more importantly, introducing, designing and implementing new features that serve the ever so fast changing business needs.
A major contributor to this trend is the need for a business to react very quickly to the rapid changes in the business in order to keep a competitive edge. For example, it is a standard practice for a Chinese web site company to push new releases on a weekly basis, the Chinese companies consider that if they did not push new release regularly they would lose the competitiveness and would quickly lose out in the market. It is impractical, if not impossible, to hand over the developments to external suppliers as it would otherwise undoubtedly increase the time and cost to the current and future developments as well as maintaining a good and effective team to support the system.
Companies such as Google encourage their internal developers to come up with new ideas that could potentially benefit the business. The speed of realising those ideas to the live environment in these companies is second to none, now, let’s imagine if they do this by employing external suppliers. A business needs strong, committed and motivated development teams and should encourage these teams to innovate to improve the systems. At the end of the day, who are better than the guys who wrote the software to support and improve it? Who have the most communication to the end users? Who know more about what the end users like and dislike? Who are working in the organisation day in and day out to know what the business may need? (There is an argument about the level of involvement of software guys in the overall business but then we are getting into the area of the difference between Programmers and Developers, which I am not getting into this time) Who are cheaper to deliver the projects overall? I think the answer is obvious.
Posted in July 8, 2009 ¬ 10:27 amh.Ning Zhao
Google announced today that it is launching a new Operating System named ‘Google Chrome OS’ which targets primarily netbooks. As its name suggests, it is a lightweight OS that runs Google Chrome browser on top of a Linux kernel which is optimised to run web applications in the browser. Unlike MS Windows, it is simple and instead of installing various apps to provide functionalities (and bog down the core OS) everything will be run from the web (i.e. utilising the Google Apps). This sounds great from a web developer point of view as now there is going to be a new OS that is optimised to run medium to high-end web apps that are JavaScript and AJAX heavy on very low profile computers. Taking traditional Windows desktop apps and their functionality to the web platform is always to way forward and this new OS, in my opinion, is definitely a step in the right way.
I’m a loyal Microsoft fan but I have to say that I am very disappointed that Microsoft is losing its edge in this front. The new Google OS is designed to be ‘down to the basics’ and I wonder why Microsoft refuses to do the same for its products. Windows 7 seems to be Microsoft’s attempt to address the problems introduced by the clunky Vista and I recon it will be a success to a certain degree but it is not enough, far from it actually, just take a look at what Apple will do for its Snow Leopard. Microsoft has the same if not more talented developers at its Redmond base and I wonder why they couldn’t come up with something in the same league of Firefox or Android (Don’t get me started on Windows Mobile…). Back to the basic is exactly what Microsoft needs right now.
Posted in July 8, 2009 ¬ 12:18 amh.Ning Zhao
It’s about time I updated my blog. Decided to give it an updated look as well so I went for WordPress, not bad of a blog engine at all, I have to say. Anyways, will soon adding more widgets like LinkedIn etc.