Sunday, September 30, 2007

First round of my presentation

Panick..... Sweaty palm.....

This is my first presentation of java design pattern - prototype. Everyone of us is holding a peer review paper and is told to grade our classmates. How low mark will i get graded from them (Shiver).

This is the design patterns that I had gathered in our last presentation.

First presenter: Facade design pattern
  • The Facade pattern is used to make a single class represent an entire subsystem.
  • The Façade pattern allows you to simplify this complexity by
    providing a simplified interface to these subsystems.
Second presenter: Flyweight design pattern
  • Uses the instrinsic properties to create a pool of objects that would be created once rather than being created each time the same object is needed.
  • It also takes the extrinsic properties away from objects and finds a common instrinsic state among them.
  • Advantage: When hundreds or thousands of similar objects need to be created, it will be taxing on the system but not so when using this pattern as it cuts the creation of the same object by creating it only once and the clients can just retrieve it from a pool of others.

Third presenter: Prototype design pattern (Me)

  • The Protoype pattern is used when creating an instance of a class is very
    time-consuming or complex in some way. Then, rather than creating more
    instances, you make copies of the original instance, modifying them as
    appropriate.
  • Prototypes can also be used whenever you need classes that differ only in the
    type of processing they offer.
  • Shallow and Deep prototype design pattern
Forth presenter: Decorator
  • The aim of a decorator is to extend the functionality of a core class without modifying the class so as to make code maintenance easier.
  • It uses a class that takes in an original object and adds new methods or stuff to it, to obtain a desired outcome.
  • Advantage: while most classes does a certain function or presentation, new functions to be added into the class need to be recoded, compiled and run while using this pattern, the object just needs to be passed into the decorator class to obtain the much need functionality
Fifth presenter: Chain of Responsibility
  • The Chain of responsibility allows an even further decoupling between classes, by passing a request between classes until it is recognized.
Sixth presenter : Singleton
  • Helps to provides a class of which there can be no more than instance, and provides a single global point of access to that instance.

The presentation had given me a brief idea of what indiviual pattern is. However ,i think i have to read up more in order to catch up with my classmate. More patterns are coming next week....

Friday, September 28, 2007

Java Beans (Continue...) Part II

Begining of the lesson, we need to choose the desire pattern for our presentation. Each of us need to choose 3 design patterns and present to our classmates. I had chosen template , bridge and prototype for my java pattern design. At first i thought java will be java , but after attending this module i just need to scratch my head.... Java itself there are 23 types of main design pattern.
To catch up with all the pattern , i think i need to have sleepless night to read all the related material up ...esp. Gang of Four.

What are Java pattern?
Design patterns form a cohesive language that helps to describe classic solutions to common object oriented design problems. These patterns enable the user to discuss systems of objects as quasi-encapsulated entities. By using design patterns, it helps to solve programming problems and the proper perspective on the design process can be maintained.

Last lesson , we had briefly understand the definination and concept of Java beans. It is a concept and software component model , that when java classes adheres to , will be known as a Bean. In the 4th lesson of CBSE , the course had brought up the conventions of Java Bean.

1) Classes must be serializable or externalizable (for perisitency)
2) Need default constructor (constructir with no arguements)
3) Get and set methods for each property.
4) Requires event listeners in each class that interfaces with on another.

The aim of Java beans is to allows us to have a portable , reuseable and platform independent advantages. It also allow us to have an interface driven as well as highly customizable.Hence , user may take shorter working time to process as not much coding is to be done.

Next , how events is related to beans?
The events are related to link components.For a Bean to be the source of an event,it must implement methods that add and remove listener objects for the type of event.Hence , it helps a source Bean know where to fire events.

Tuesday, September 18, 2007

"SOAP up the Bean"

XML
The lesson begins with the understanding of XML (extensible Markup Language). It is basically a markup language for documents containing structured information. XML is different from HTML. In HTML , both the tag semantics and the tag set are fixed.An h1 is always a first level heading and the tag ati.product.code is meaningless. The W3C, in conjunction with browser vendors and the WWW community, is constantly working to extend the definition of HTML to allow new tags to keep pace with changing technology and to bring variations in presentation (stylesheets) to the Web.

In XML, it specifies neither semantics nor a tag set. In fact XML is defined as a meta-language for describing markup languages. On other words, XML provides a facility to define tags and the structural relationships between them. Since there's no predefined tag set, there can't be any preconceived semantics. All of the semantics of an XML document will either be defined by the applications that process them or by stylesheets.

To apprecitate XML, it is important to understand the way it is created. It was created so that richly structured document could be used over the web.On the other hand,XML is not designed to replace SGML. XML is designed to deliver structured content over the web , some of the very features it lack to make this practical , make SGML a more satisfactory solution for the creation and long time storage of complex documents. Hence, most organization had filtered SGML to XML to produce a standard procedure for web delivery.

SOAP - Simple Object Acess Protocol
It is a protocal for exchanging XML-based messages over computer networks normally using HTTP/HTTPS.It forms the foundation layer of the web services stack , providing a basic messaging framework that more abstract layers can build on.

Advantages:
1) Using SOAP over HTTP allows for easier communication behind proxies and firewalls than previous remote execution technology. This is because the common port-80 is opened. SOAP is versatile to allow the use of different transport protocols.
Weaknesses
1) When relying on HTTP as a transport protocol and not using WS-addressing or an ESB the roles of the interacting parties are fixed. Only one party (the client) can use the services of the other. Developers must use polling instead of notification in these common cases.
2) Many SOAP implementations limit the amount of data that can be sent.


JAVA BEAN
It is a portable, platform-independent software component model that allows developers to wrote reusable components once and run them in anywhere. Beans are Java classes that can be manipulated in a visual builder tools and view as a component. When any Java class that adheres to property and event interface conventions, it is known as a Bean.

Tuesday, September 11, 2007

~The Methodology of Extreme Programming~

The second lesson of CBSE:

A Brief idea of Extreme programming:
1)Extreme programming is a deliberate and disciplined approach to software development.
2)It is more effective to use in risky projects with dynmaic requirements.
3)Work best in small teams that consists of less than 10 developers
4)Handle small to medium size of in house information system projects in short duration.

Advantages of Extreme programming:
1)The lightweight approach bring together and interrlates existing development best practise.
2)Enhance knowlege management among the employees
3)Better team work and communication
4)Documentation is minimal as the time is well spent on working for solutions.
5)Able to redesign and refactor in the mid-stage of the project.

Disadvantages of Extreme programming:
1)As XP approach is fragile,it may fail if the project environment had change or a change in team member.
2)Lack of design documentation
3)Is code centred rather than design-centered development (was neglected)
4)Does not provide any training or guidances
5)Narrow segment of software work

For a XP team to get together , we need to extremely look into the following practices:
1) The planning game
2) Small releases
3) On site Customer
4) Continuous integration
5) Simple Design
6) Merciless refactoring
7) Relentless testing
8) Collective code ownership
9) Sustainable pace
10)Pair programming

....Second half of the lesson....
Client-Server Models , Components acress the internet and next Generation Web services

The primary objective of this topic focus on the primer of distributed systems.
The discussion involve the following:

1) One-Tier Model (Expensive , custom application)
2) Two-Tier Model (Potential for thin client)
3) Multi-Tier /N-Tier Model (Decouples client from server)

~~Component Object Model Technologies~~

Component object modek technology enables software components to communicate. It is use by developers to create re-useable software components, link components together to build applications and take advantages of windows services. COM is used in applications such as Microsoft office products(MS words,excel,etc).Eg. COM OLE technology allows Word documents to dynmically link to data in Excel spreadsheets and COM Automation allows user to build scripts in their applications to perform repetitive tasks or control one application from another.

Tuesday, September 4, 2007

Introduction of Component-Based Software Engineering

After attending the first lesson with Mr. Mok, I think this module - CSI3303 Component-Based Software Engineering will be a tough journey for me in the coming semester. With extremely low java programming knowledge, the tension begins to arise and a voice begins to encourage me to work harder for this module.

The first half of lesson, Mr. Mok had briefly run through the teaching and learning process for this module. He had introduced two textbooks : Java design patterns: a tutorial by Cooper,J.W. and design patterns elements of reusable object-oriented software by Gamma , E. He had also assigned the first assignment to us and explain what we should write on our weekly learning journal for this module and research on the 23 object oriented pattern.

The lecture begins with the introduction of component-based development of software engineering. In depth, CBSE is a reusable based approach to define and assist in implementing loosely coupled components into the systems. As single object classes are too detailed and specific, CBSE has emerged from the failure of object-oriented development to support effective reuse. Hence, it is more independent and eases to use when developing.

The component is defined as a software unit whose functionality and dependencies are completely defined by its interfaces. It comes with a set of standard that allow to facilitate component integration .Through components, we are able to lead software engineering to a well engineering discipline.

CBSE Process:

(1) Identify the outline system requirements
(2) Identify candidate components
(3) Modify requirements according to discovered components
(4) Architectural design
(5) Identify candidate components
(6) Compose components to create system

The process of CBSE: Issue and Challenge. By Gerald Kotonya, Computing Department, Lancaster University, UK.
URL Link : miro.sztaki.hu/projects/cbsenet/budapest/presentation/Gerald-CBSEProcess.ppt

In this module, it had highlighted the highly iterative process of CBSE and the component of identification issues(trust,requirement and validation).