Thursday, September 29, 2005

Spring Reference Applications

http://jroller.com/page/raible/apps
  • AppFuse - a bootstrapping application for starting your Struts, Spring and Hibernate-based web applications. Also includes support for iBATIS, Spring MVC, WebWork, JSF and Tapestry. AppFuse's mailing list, forums and downloads are at http://appfuse.dev.java.net. Tutorials are also available. Struts Resume is a reference implementation of an AppFuse 1.4 application.
  • Better Petshop Project - a version of the Tapestry Petshop that uses Spring and Hibernate.
  • Equinox (a.k.a. AppFuse Light) - a simple CRUD app created as part of Spring Live. Uses SiteMesh, Spring and Hibernate by default. The 1.2 version supports all of the persistence frameworks discussed in Chapter 7 (Hibernate, iBATIS, JPOX, OJB, Spring JDBC) and all of the web frameworks discussed in Chapter 11 (Spring, Struts, JSF, WebWork and Tapestry). Download Chapter 2 (PDF) to see how to develop an application using Equinox. You can download the completed Struts-version here.
  • iEat - uses Spring MVC and XSLT as the view technology. JAXB is used to render DOM Documents that are persisted via Hibernate (whose configuration is generated from the application's XML schema via HyperJAXB). The application design thus begins at the data model level with XML Schema definitions but you don't have to generate DOM objects yourself in application code as JAXB will generate them for you.
  • Pizza Demo - a sample app that uses Spring with Hibernate and shows wizards using Spring's MVC framework. From Craig's post: I'm using Maven to build it, so you'll need to download and install Maven to actually build the code. I'm using Hypersonic DB, but Maven will download that for you. But you will need to download the Pizza DB (at the same URL as above). Finally, as I also mentioned, I designed the code in a way that best demonstrates my points in the talk and not necessarily how I would've designed it in the real world.
  • SimpleOA - an open source project for e-form sign off. Uses Spring, Tapestry, Hibernate and OSWorkflow. Project Summary (in Chinese) and Screenshots.
  • ONess - an Enterprise Resource Planning (ERP), Customer Relationship Management (CRM), Supplier Relationship Management (SRM) and Inventory Management solution for small to midsized business. Uses Acegi Security, Hibernate, AspectJ, Struts, JSTL, Tiles, StrutsTestCase, DBUnit, jMock and some great ideas from AppFuse. Everything managed with Maven.
  • Trails - a domain driven development framework inspired by others that have gone before it such as Rails and Naked Objects. Its goal is to make developing database driven web applications in Java radically easier, faster, and more fun. The basic approach is to eliminate as many of the steps as possible. Developed using Tapestry, Spring and Hibernate. You can read my thoughts on raibledesigns.com.






Monday, September 26, 2005

Introduction to Aspect-Oriented Programming

Introduction to Aspect-Oriented Programming


An Introduction to Aspect-Oriented Programming with the Spring Framework, Part 1


An Introduction to Aspect-Oriented Programming with the Spring Framework, Part 2


--
h.o.s.a.m.r.e.d
Be OpeN Mind
--
http://hosamred.blogspot.com



Why Spring?

The Spring Framework is an open source application framework that aims to make J2EE development easier.


Important 

Spring is an application framework. Unlike single-tier frameworks such as Struts or Hibernate, Spring aims to help structure whole applications in a consistent, productive manner, pulling together best-of-breed single-tier frameworks to create a coherent architecture.


Problems with the Traditional Approach to J2EE

Since the widespread implementation of J2EE applications in 1999/2000, J2EE has not been an unqualified success in practice. While it has brought a welcome standardization to core middle- tier concepts such as transaction management, many — perhaps most — J2EE applications are over- complex, take excessive effort to develop, and exhibit disappointing performance. While Spring is applicable in a wide range of environments — not just server-side J2EE applications — the original motivation for Spring was the J2EE environment, and Spring offers many valuable services for use in J2EE applications.

Experience has highlighted specific causes of complexity and other problems in J2EE applications. (Of course, not all of these problems are unique to J2EE!) In particular:

  • J2EE applications tend to contain excessive amounts of "plumbing" code. In the many code reviews we've done as consultants, time and time again we see a high proportion of code that doesn't do anything: JNDI lookup code, Transfer Objects, try/catch blocks to acquire and release JDBC resources. . . . Writing and maintaining such plumbing code proves a major drain on resources that should be focused on the application's business domain.

  • Many J2EE applications use a distributed object model where this is inappropriate. This is one of the major causes of excessive code and code duplication. It's also conceptually wrong in many cases; internally distributed applications are more complex than co-located applications, and often much less performant. Of course, if your business requirements dictate a distributed architecture, you need to implement a distributed architecture and accept the tradeoff that incurs (and Spring offers features to help in such scenarios). But you shouldn't do so without a compelling reason.

  • The EJB component model is unduly complex. EJB was conceived as a way of reducing complexity when implementing business logic in J2EE applications; it has not succeeded in this aim in practice.

  • EJB is overused. EJB was essentially designed for internally distributed, transactional applications. While nearly all non-trivial applications are transactional, distribution should not be built into the basic component model.

  • Many "J2EE design patterns" are not, in fact, design patterns, but workarounds for technology limitations. Overuse of distribution, and use of complex APIs such as EJB, have generated many questionable design patterns; it's important to examine these critically and look for simpler, more productive, approaches.

  • J2EE applications are hard to unit test. The J2EE APIs, and especially, the EJB component model, were defined before the agile movement took off. Thus their design does not take into account ease of unit testing. Through both APIs and implicit contracts, it is surprisingly difficult to test applications based on EJB and many other J2EE APIs outside an application server. Yet unit testing outside an application server is essential to achieve high test coverage and to reproduce many failure scenarios, such as loss of connectivity to a database. It is also vital to ensuring that tests can be run quickly during the development or maintenance process, minimizing unproductive time waiting for redeployment.

  • Certain J2EE technologies have simply failed. The main offender here is entity beans, which have proven little short of disastrous for productivity and in their constraints on object orientation.


Spring's Values

To make the most effective use of Spring, it's important to understand the motivation behind it. Spring partly owes its success to its being based on a clear vision, and remaining true to that vision as its scope has expanded.

The key Spring values can be summarized as follows:

  • Spring is a non-invasive framework. This is the key departure from most previous frameworks. Whereas traditional frameworks such as EJB or Apache Avalon force application code to be aware of the framework, implementing framework-specific interfaces or extending framework- specific classes, Spring aims to minimize the dependence of application code on the framework. Thus Spring can configure application objects that don't import Spring APIs; it can even be used to configure many legacy classes that were written without any knowledge of Spring. This has many benefits. For example:

    • Application code written as part of a Spring application can be run without Spring or any other container.

    • Lock-in to Spring is minimized. For example, you could migrate to another lightweight container, or possibly even reuse application objects in an EJB 3.0 EJB container, which supports a subset of Spring's Dependency Injection capability.

    • Migration to future versions of Spring is easier. The less your code depends on the framework, the greater the decoupling between the implementation of your application and that of the framework. Thus the implementation of Spring can change significantly without breaking your code, allowing the framework to be improved while preserving backward compatibility.

      Of course in some areas, such as the web framework, it's impossible to avoid application code depending on the framework. But Spring consistently attempts to reach the non-invasive ideal where configuration management is concerned.

  • Spring provides a consistent programming model, usable in any environment. Many web applications simply don't need to run on expensive, high-end, application servers, but are better off running on a web container such as Tomcat or Jetty. It's also important to remember that not all applications are server-side applications. Spring provides a programming model that insulates application code from environment details such as JNDI, making code less dependent on its runtime context.

  • Spring aims to promote code reuse. Spring helps to avoid the need to make some important hard decisions up front, like whether your application will ever use JTA or JNDI; Spring abstractions will allow you to deploy your code in a different environment if you ever need to. Thus Spring enables you to defer architectural choices, potentially delivering benefits such as the need to purchase an application server license only when you know exactly what your platform requirements are, following tests of throughput and scalability.

  • Spring aims to facilitate Object Oriented design in J2EE applications. You might be asking "How can a J2EE application, written in Java — an OO language — not be OO?" In reality, many J2EE applications do not deserve the name of OO applications. Spring aims to remove some of the impediments in place of OO in traditional designs. As one of the reviewers on this book commented, "The code I've seen from my team in the year since we adopted Spring has consistently been better factored, more coherent, loosely coupled and reusable."

  • Spring aims to facilitate good programming practice, such as programming to interfaces, rather than classes. Use of an IoC container such as Spring greatly reduces the complexity of coding to interfaces, rather than classes, by elegantly concealing the specification of the desired implementation class and satisfying its configuration requirements. Callers using the object through its interface are shielded from this detail, which may change as the application evolves.

  • Spring promotes pluggability. Spring encourages you to think of application objects as named services. Ideally, the dependencies between such services are expressed in terms of interfaces. Thus you can swap one service for another without impacting the rest of your application. The way in which each service is configured is concealed from the client view of that service.

  • Spring facilitates the extraction of configuration values from Java code into XML or properties files. While some configuration values may be validly coded in Java, all nontrivial applications need some configuration externalized from Java source code, to allow its management without recompilation or Java coding skills. (For example, if there is a timeout property on a particular object, it should be possible to alter its value without being a Java programmer.) Spring encourages developers to externalize configuration that might otherwise have been inappropriately hard-coded in Java source code. More configurable code is typically more maintainable and reusable.

  • Spring is designed so that applications using it are as easy as possible to test. As far as possible, application objects will be POJOs, and POJOs are easy to test; dependence on Spring APIs will normally be in the form of interfaces that are easy to stub or mock. Unlike the case of JNDI, for example, stubbing or mocking is easy; unlike the case of Struts, for example, application classes are seldom forced to extend framework classes that themselves have complex dependencies.

  • Spring is consistent. Both in different runtime environments and different parts of the framework, Spring uses a consistent approach. Once you learn one part of the framework, you'll find that that knowledge can be leveraged in many others.

  • Spring promotes architectural choice. While Spring provides an architectural backbone, Spring aims to facilitate replaceability of each layer. For example, with a Spring middle tier, you should be able to switch from one O/R mapping framework to another with minimal impact on business logic code, or switch from, say, Struts to Spring MVC or WebWork with no impact on the middle tier.

  • Spring does not reinvent the wheel. Despite its broad scope, Spring does not introduce its own solution in areas such as O/R mapping where there are already good solutions. Similarly, it does not implement its own logging abstraction, connection pool, distributed transaction coordinator, remoting protocols, or other system services that are already well-served in other products or application servers. However, Spring does make these existing solutions significantly easier to use, and places them in a consistent architectural approach.



for more information:


--
h.o.s.a.m.r.e.d
Be OpeN Mind
--
http://hosamred.blogspot.com



Thursday, September 15, 2005

Enable Java Virtual Machine for Remote Debugging

You can debug Java application remotely.
But first. You need to configure your java virtual machine to enable remote debugging.
Remote debugging is dependent only on your java virtual machine.Not depend on your application server.

to do this pass the following start up parameters when you start your java virtual machine

option purpose
-Xdebug Enables debugging support in the VM
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n Loads in-process debugging libraries and specifies the kind of connection to be made.

for more information:

Configuring Tomcat For Remote Debugging:
Configuring Eclipse for Remote Debugging:
http://www.onjava.com/pub/a/onjava/2005/08/31/eclipse-jboss-remote-debug.html

--
h.o.s.a.m.r.e.d
Be OpeN Mind
--
http://hosamred.blogspot.com

Google Launches Search Engine For Blogs

Google Launches Search Engine For Blogs
InformationWeek
The company is going into competition with niche blog-specific search engines such as Technorati, Icerocket, and Feedster. The other major search engines are expected to follow

http://informationweek.com/story/showArticle.jhtml?articleID=170703345

search url:
http://blogsearch.google.com/


--
h.o.s.a.m.r.e.d
Be OpeN Mind
--
http://hosamred.blogspot.com



Wednesday, September 14, 2005

Gates on Apple, Google -- and Microsoft's future

Gates on Apple, Google -- and Microsoft's future
Seattle Post Intelligencer
LOS ANGELES -- Microsoft Corp. is grappling with "a lot of smart competitors," including Google and Apple, who are ahead of the Redmond company in some key markets, Bill Gates acknowledges

--
h.o.s.a.m.r.e.d
Be OpeN Mind
--
http://hosamred.blogspot.com



"Value of Spring" whitepaper for review

Posted by: Joseph Ottinger on September 13, 2005 @ 12:36 PM

Rick Hightower has written a "What's the value of Spring?" whitepaper, aimed at aimed at architects, managers and developers unfamiliar with the framework. He's asking for review of the document before it's propagated to the wider audience.

If you are familiar with Spring, what would you suggest to Rick to improve? If you're not, does his whitepaper serve as a valid and worthwhile introduction to Spring?

http://www.theserverside.com/news/thread.tss?thread_id=36503

--
h.o.s.a.m.r.e.d
Be OpeN Mind
--
http://hosamred.blogspot.com



Tuesday, September 13, 2005

Oracle Will Buy Siebel for $5.85 Billion


Database and business applications software developer Oracle Corp. announced Monday that it will acquire Siebel Systems Inc. for $10.66 per share, or about $5.85 billion.

Siebel develops CRM (customer relationship management) software. The company has about 4,000 application customers and 3.4 million CRM users, according to a statement released Monday by Oracle, of Redwood Shores, Calif.

http://www.eweek.com/article2/0,1895,1857881,00.asp


--
h.o.s.a.m.r.e.d
Be OpeN Mind
--
http://hosamred.blogspot.com



Monday, September 12, 2005



Samsung unveils 16-GB chip
Korea Herald (subscription) - 1 hour ago
Samsung Electronics Co., the world's biggest computer-memory chipmaker, said yesterday it has developed the world's first 16-gigabit flash memory chip using 50-nanometer manufacturing technology.


--
h.o.s.a.m.r.e.d
Be OpeN Mind
--
http://hosamred.blogspot.com



Saturday, September 10, 2005

Eclipse Effect Will Bring Open-Source Opportunities Into View

Plans for an Eclipse Application Lifecycle Framework (ALF) will open up new opportunities for open-source developers and systems integrators, executives said at EclipseWorld.

http://www.crn.com/sections/software/software.jhtml?articleId=170701427

--
h.o.s.a.m.r.e.d
Be OpeN Mind
--
http://hosamred.blogspot.com



Microsoft Looks To Developers To Catch Up To Google, Yahoo

InformationWeek -
Microsoft plans to release several APIs designed to help developers build applications that use MSN Search. By Antone Gonsalves. Microsoft Corp.

http://informationweek.com/story/showArticle.jhtml?articleID=170702080



--
h.o.s.a.m.r.e.d
Be OpeN Mind
--
http://hosamred.blogspot.com




Wednesday, September 07, 2005

Mobile phones with MP3 functions may be the next big thing

Mobile phones with MP3 functions may be the next big thing
Channel News Asia -
SINGAPORE : Mobile phones with MP3 functions may be the next big thing in the MP3 world. Some of the latest phones, such as the Sony Ericsson W800i, have a memory of up to two gigabytes which can store as many as 600 songs.

--
h.o.s.a.m.r.e.d
Be OpeN Mind
--
http://hosamred.blogspot.com



Jakarta Slide is a Java-based WebDAV server

Jakarta Slide is a Java-based WebDAV server and client library that supports multiple underlying content repositories. Slide's WebDAV Contruction Kit provides a framework for more easily integrating WebDAV capabilities into existing Java software using Slide.

Its features:
  • Full WebDAV Support
  • Basic DeltaV WebDAV Versioning Support
  • Support for a variety of backend systems for storing the content including different databases and file system storage
  • Transactions and Locking for data integrity
  • Flexible control over permissions at a per file level via support for the WebDAV ACL
  • DASL support for any backend, extensible for using backends search capabilities for higher scalability and less latency
  • Binding support
  • Simple installation as .war deployment
  • 'ready-to-run' binary distribution for Tomcat
  • A fully featured WebDAV client library and command line client


http://jakarta.apache.org/slide/


--
h.o.s.a.m.r.e.d
Be OpeN Mind
--
http://hosamred.blogspot.com



From Data Management to Information Integration: A Natural Evolution

Level: Introductory

Mary Roth , Senior engineer and Manager , IBM Silicon Valley Lab
Dan Wolfson , Senior Technical Staff Member and Manager, IBM Silicon Valley Lab

20 Jun 2002

The boundaries that have traditionally existed between DBMSs and other data sources are increasingly blurring, and there is a great need for an information integration solution that provides a unified view of all of these services. This article proposes a platform that extends a federated database architecture to support both relational and XML as first class data models, and tightly integrates content management services, workflow, messaging, analytics, and other enterprise application services.

© 2002 International Business Machines Corporation. All rights reserved.

http://www-128.ibm.com/developerworks/db2/library/techarticle/0206roth/0206roth.html



--
h.o.s.a.m.r.e.d
Be OpeN Mind
--
http://hosamred.blogspot.com



The Future of Distributed Software Development on the Internet

Level: Introductory

Jim Whitehead , Chief, IETF WebDAV Working Group

05 Jan 2004

The success of geographically dispersed development teams working together over the Web depends on their ability to manage and control change of their source code. Read about the software configuration management systems available today, including CVS, WebDAV, to Delta-V.

http://www-128.ibm.com/developerworks/rational/library/2056.html


--
h.o.s.a.m.r.e.d
Be OpeN Mind
--
http://hosamred.blogspot.com



كيف تنمي قدرتك علي التفكير

ـ اجعل لنفسك هدف في الحياة
ـ  كثرة القراءة
ـ  كثرة الإحتكاك مع الناس
ـ  إدخل مدخلات جيدة لعقلك ينتج منتجات جيدة
ـ  القدرة علي التخيل
ـ  التفكير في مجموعات عمل
ـ المشي و حيدا


--
h.o.s.a.m.r.e.d
Be OpeN Mind
--
http://hosamred.blogspot.com