|
|||||
|
After a long conversation with Wade Wassenberg and reading his article about Protocol Independent Programming (PIP), I have decided to write a summary about my theory of software development. There are tons of tools such as APIs and frameworks, which pretend to be an "everything what you need to build a successful project". There are many guru voices: There cannot be THE tool (fw, api), which will solve all our problems. We should use several tools, APIs, frameworks to be successful.So, what should one do? Think, and use paradigms or theories. The following is "my" theory: LAYERED APPLICATION DESIGN AND DEVELOPMENT (LADD).From historical perspective and from my own experience I have made a conclusion: In short LADD is an application architecture, where system has clearly visible parts (layers) and every part is responsible for certain functionality. It is very important that there are calls only to next layer and no calls to skip a layer. There is no duplication of functionality. Object oriented design is one example of LADD. LADD is more than OOP, there are tons of examples outside of OOP like; mainframe architecture, UNIX, ANSI C standard, OSI stack of protocols and POSIX, to name a few. Of course some tools and frameworks promote LADD and some have features, which create obstacles on the way to LADD. LADD is not my invention, but purely a guidance, that could be found in many good books. I just realized how sticky I am to LADD and that sometimes people look to narrow and believe that certain feature may save the day. To continue let consider "Patterns", all of them (Singleton, DAO, Factory, etc.), they are examples of demarcation between layers of functionality and responsibilities.
Lets consider a possible scenario: Now we have to go over the entire system to find and then fix all places where the API has been used. What if we have coded our system in a manner, where everything related to deal with certain API (or functionality) has placed in one layer (could be library, class, package, etc.)? We know for sure where problems could happen and we will be able to fix them easier. Concrete example could be: tons of SQL code across application versus placing such code in a specific layer, which is responsible for DB communication (DAO pattern). To continue the example: hard coded SQL code in DAO object or SQL in resource file. If I can see all SQL code in one place I will not worry too much whenever the code is SQL 92 compliant and portable across different RDBMS. Migration to another DB will be a relatively simple job. With LADD in mind I consider PIP just as an API to use, and it is not a cornerstone. Communication protocol is important, but it is only a small part in a big and complex system infrastructure. Let's discuss PIP from my standpoint. Value of PIP for business programming depends on availability of PIP framework(s) and suitability/maturity/completeness of such tool. As PIP is very generic paradigm and has no connections with any business functionality, I would expect only software vendors investing time and money into development of tools to support PIP. PIP is a very appealing idea and I know several implementations, which pretend to be a PIP:
Another example might be Java (Java programming is platform independent because Java IS a platform). If we develop a business application, then Java's abilities are enough for us (?). But if we are going to develop high speed communication server (RDBMS for instance) then, Java will not be even considered as implementation platform. Even with the suitability of Java for business programming, nobody's business tries to tailor JVM, but participate in improvement the process via Java Community Process. One, maybe a negative example of development a JVM, is an approach that could be ORACLE Forms. From high perspective ORACLE Forms architecture it is roughly equal to JVM, but targeted to only one case and was developed by one vendor (do not forget, it is a software vendor with great experience in software development). Every time we announce a new level of "independence" or "abstraction" we should be very careful.
The entire IT industry is slowly developing such abstraction levels, starting from lower levels up to business layers. Let's name the layers: Do you recall the time when nearly every company developed their own text editor, database server, HTTP-server and Servlet engine? The speed of the process is really slow because software vendors are not very interested in the process. Because the process of improvements is driven by only the common sense, it will not be moving with lightning speed. We have already discussed the broad perspective. Now, let me discuss the low level stuff, like Java Abstract classes and Interfaces that promotes LADD. (We should use them but...) Abstract classes (abstract functions). Java Interfaces. Although I consider it to be good to code against Interfaces, even though I would admit, that in certain circumstances an attempt to bring formal interfaces could be harmful. In general, there are no absolute rules. Even LADD is a bad idea when we need to get something done in 10 minutes. Good judgment always should be used. PS: Thank you Wade for valuable input. PS2: Java critic I value Java-J2EE for promoting of LADD, but Regexp functionality of String class in JDK 1.4 is disrespectful to LADD and makes me scary of Java future. |
||||
| © 2001 - 2006 Konstantin Ignatyev | |||||