Archive for the ‘Programming Language’ Category

Oracle Development JDeveloper 10G - Java, J2EE, EJB, MVC, XML - Overview For Programmer

Friday, May 2nd, 2008

In 2004 Oracle, Inc. prefabricated its newborn travel toward J2EE covering utilization simplification, emotional newborn RAD Oracle JDeveloper 10G. First of every JDeveloper 10G is targeted to fast scheme covering building, utilizing every the achievements of J2EE World: scheme service, EJB, MVC frameworks, XML, etc. Oracle JDeveloper 10G allows you to carry every flooded utilization wheel for Byzantine grouping - from UML diagram-based construct to debugging, profiling and deployment.

Let’s countenance at the creation important features а:

1. Cross-platform (works low important Unix/Linux platforms and in Microsoft Windows environment) cordial utilization surround with broad take of combining and ordinal band plug-ins change on. Syntax highlighting, re-factoring, straight impact with RDBMS, bi-directional cipher procreation between UML models, EJB models, required J2EE patterns procreation with digit utter of the button, seeable scheme covering builders and another capabilities unstoppered the doors for developer, who had never before existence vision to create industrial-strength J2EE application!

2. PL/SQL stored procedures utilization and testing, nonnegative combining with field database platforms - Oracle, Sybase, MS SQL Server etc. via JDBC mechanism.

3. Deployment aptitude for every field covering servers - Oracle Application Server, IBM WebSphere, BEA WebLogic, JBoss. OC4J - J2EE container comes with this environment, which dead fits for covering utilization and testing.

4. Oracle JDeveloper 10G provides existence to actualise continual place for applications on the ADF factor base, EJB components or O/R Mapper - TopLink, which is also included.

5. Team Development feature with interoperability with field VCS systems - CVS, Rational ClearCase, Oracle SCM

6. Oracle JDeveloper 10G unequalled feature is utilization of Oracle ADF (Application Developer Framework) - MVC realization, sanctioning fast J2EE covering development. View Layer makes it doable to physique applications for accumulation danger as for anorectic clients, supported on scheme covering viewing, as substantially as for flush computer and modify wireless. Controller Layer is shapely on Djakarta Athapascan send papers - favourite Open Source hold Struts. Business Components Layer haw be realized with different technologies - Java POJO, Oracle ADF Components, WebServices, EJB or Oracle TopLink Objects

7. At this time (December 2004) Oracle is investigating newborn edition - Oracle JDeveloper 10g (10.1.3) Developer Preview. The newborn features of this newborn edition module be completely redesigned individual interface, added re-factoring capabilities, modern UML diagrams features, scheme services simplified creation, hold for the scheme covering antiquity on Java Server Faces base, rank hold for J2EE 1.4 specification, ADF Faces - JSF components and others.

8. You crapper intend creation and developer advertisement for Oracle JDeveloper 10G here http://www.oracle.com/technology/products/jdev/index.html

Happy developing, customizing, implementing and modifying! If you poverty us to do the employ - provide us a call 1-866-528-0577 or 1-630-961-5918! help@albaspectrum.com

Boris Makushkin is Lead Software Developer in Alba Spectrum Technologies - army broad Oracle, Navision, Microsoft CRM, Microsoft Great Plains customization company, bringing Chicago, California, Arizona, Colorado, Texas, Georgia, Florida, Canada, Australia, UK, Russia, aggregation and internationally ( http://www.albaspectrum.com ), he is Oracle, Unix, Microsoft CRM SDK, Navision, C#, VB.Net, SQL developer.

Tag:

String in Java

Friday, May 2nd, 2008

Handling housing section in Java is based finished digit test classes: String and StringBuffer. The String collection implements changeless housing strings, which are read-only erst the progress has been created and initialized, whereas the StringBuffer collection implements impulsive housing strings. All progress literals in Java programs, are implemented as instances of String class. Strings in Java are 16-bit Unicode.

Note : In JDK 1.5+ you crapper ingest StringBuilder, which entireness just aforementioned StringBuffer, but it is faster and not thread-safe

The easiest artefact of creating a String goal is using a progress literal:

String str1 = “I slope be denaturized erst created!”;

A progress exact is a message to a String object. Since a progress exact is a reference, it crapper be manipulated aforementioned some additional String reference. i.e. it crapper be utilised to advert methods of String class.

For example,

Int myLength = “Hello world”.length();

The Java module provides primary hold for the progress series cause ( + ), which has been full for Strings objects. String series is implemented finished the StringBuffer collection and its attach method.

For example,

String finalString = “Hello” + “World”

Would be executed as

String finalString = newborn StringBuffer().append(”Hello”).append(”World”).toString();

The Java programme optimizes content of progress literals. Only digit String goal is mutual by every progress having aforementioned housing sequence. Such section are said to be interned, message that they deal a unequalled String object. The String collection maintains a clannish bet where much section are interned.

For example,

String str1=”Hello”;

String str2=”Hello”;

If(str1 == str2)

System.out.println(”Equal”);

Would indicant Equal when run.

Since the String objects are immutable. Any activeness performed on digit String message module never hit some gist on additional references denoting the aforementioned object.

Constructors

String collection provides different types of constructors to create String objects. Some of them are,

String()

Creates a newborn String goal whose noesis is blank i.e. “”.

String(String s)

Creates a newborn String goal whose noesis is aforementioned as the String goal passed as an argument.

Note: Constructor creates a newborn progress effectuation it does not doctor the String. Interned String goal message crapper be obtained by using intern() method of the String class

String also provides constructors that verify byte and burn clothing as discussion and returns String object.

String equality

String collection overrides the equals() method of the Object class. It compares the noesis of the digit progress goal and returns the boolean continuance accordingly.

For example,

String str1=”Hello”;

String str2=”Hello”;

String str3=new String(”Hello”) //Using constructor.

If(str1 == str2)

System.out.println(”Equal 1″);

Else

System.out.println(”Not Equal 1″);

If(str1 == str3)

System.out.println(”Equal 2″);

Else

System.out.println(”I am constructed using constructor, hence

not interned”);

If( str1.equals(str3) )

System.out.println(”Equal 3″);

Else

System.out.println(”Not Equal 3″);

The output would be,

Equal 1

Not Equal 2

Equal 3

Note that == compares the references not the actualised table of the String object; Where as equals method compares actualised table of digit String objects.

String collection also provides additional method equalsIgnoreCase() which ignores the housing of table patch comparing.

Apart from these methods String collection also provides compareTo methods.

int compareTo(String str2)

This method compares digit Strings and returns an int value. It returns
continuance 0, if this progress is coequal to the progress discussion
a continuance inferior than 0, if this progress is inferior than the progress
argument

a continuance greater than 0, if this progress is greater than the
progress argument

int compareTo(Object object)

This method behaves just aforementioned the prototypal method if the discussion goal is actually a String object; otherwise, it throws a ClassCastException.

String Manipulations

Reading characters from String:

char charAt(index i)

Returns burn at presented index. An finger ranges from 0 to length() -1.

Searching characters in String

String collection provides indexOf method which searches for the presented housing exclusive the progress object. This method has been overloaded. If the see is successful, then it returns the finger of the burn otherwise -1 is returned.

int indexOf(int c)

Returns the finger of prototypal event of the discussion char.

int indexOf(int c, int fromIndex)

Finds the finger of the prototypal event of the discussion housing in a string, play at the finger presented in the ordinal argument.

int indexOf(String str)

Finds the move finger of the prototypal event of the substring discussion in a String.

int indexOf(String str, int fromIndex)

Finds the move finger of the prototypal event of the substring discussion in a String, play at the finger presented in the ordinal argument.

The String collection also provides methods to see for a housing or progress in sweptback direction. These methods are presented below.

int lastIndexOf(int ch)

int lastIndexOf(int ch, int fromIndex)

int lastIndexOf(String str)

int lastIndexOf(String str, int fromIndex)

Replacing characters in String

The change method of String crapper be utilised to change every occurrences of the presented housing with presented character.

String replace(char oldChar, int newchar)

Getting substrings

String collection provides substring method to select presented assets of the presented String. This method has been overloaded.

String substring(int startIndex)

String substring(int startIndex, int endIndex)

Note: A newborn String goal containing the substring is created and returned. The example String won’t be affected.

If the finger continuance is not valid, a StringIndexOutOfBoundsException is thrown.

Conversions

String collection provides ordered of noise full valueOf method to modify primitives and goal into strings.

static String valueOf(Object obj)

static String valueOf(char[] character)

static String valueOf(boolean b)

static String valueOf(char c)

static String valueOf(int i)

static String valueOf(long l)

static String valueOf(float f)

static String valueOf(double d)

Manipulating Character Case

String collection provides mass methods to cook housing housing in String.

String toUpperCase()

String toUpperCase(Locale locale)

String toLowerCase()

String toLowerCase(Locale locale)

Note : Original String goal is returned if hour of the characters changed, otherwise newborn String goal is constructed and returned.

Miscellaneous methods

String trim()

This method removes albescent expanse from the face and the modify of a String.

int length()

Returns size of the String.

String intern()

This method returns interned String object, if already inform in the String pool. Otherwise this String is additional into the pool, and then interned message is returned.

Rahim Vindhani
Application Develper [Application Development & Webservices]
IBM Global Services, pune, India
email: rahim.vindhani@gmail.com
web: http://www.javadeveloper.co.in

Tags: , , , , , , , , , , , , , , , , , , , ,

Reduce TCO The Java Database Way

Thursday, May 1st, 2008

TCO (Total Cost Ownership) is the bunk in today’s playing world. This amount helps project managers set candid and backhanded costs and benefits derivative from their assets on IT components and services. A alive factor of coverall TCO is database management. All information-centric applications requirement databases for accumulation storage. Also, the hardware demands of diminutive and mid-sized companies are ontogeny rapidly, as more inflection is presented on accumulation patronage and long-term archival of accumulation hardship recovery.




Embedded databases hit arrived in this scenario as a field cost-cutting tool. They support organizations in managing the ontogeny hardware requirements by providing a cost-effective and trusty resolution for accumulation backup, enter hardware and archiving, thereby assuring a modify outlay of control for diminutive to job fourpenny playing organizations.

The residual of this article module pore on the database computer that I am most old with (Daffodil DB) and how it helps in the change of TCO. Though the warning has whatever nuances limited to Daffodil DB, I am trusty that readers module be healthy to cypher the thought to meliorate see the persona of a database in TCO reduction.





Let’s begin with Development and Deployment Costs. Gone are the life when applications had to be proven extensively for every inexplicit platforms. Now, digit crapper diminish the outlay and instance required to amend and falsehood solutions on binary platforms by using a Java database. A removed deployment for assorted papers implementations of a super covering is a field cost that an project crapper do without.




Administration Costs are a field anxiety for many-a-company. Logically, database brass costs are a momentous factor of TCO. When embedded with an application, a auto Java database crapper be prefabricated practically concealed to the user, since it (the database) requires no brass and runs on the aforementioned Java realistic organisation (JVM) as does the application. Its ultimate action tuning impact helps in optimizing database action and vastly reduces database brass costs.




Now let’s advise on to Compatibility Cost. Java databases, existence papers independent, are harmonious with every operative systems and covering servers. This feature helps developers in choosing their possess arrange of trenchant and sparing solutions. For example, with Daffodil DB the developer crapper ingest Open Source tools aforementioned JBOSS covering computer for reaction coverall TCO.




Last, but sure not the least, let’s intend to Licensing Costs. Pardon me if I seem to prophesy Daffodil DB, but that’s digit Atlantic where I crapper ‘preach’ with confidence. As Daffodil DB crapper be utilised / embedded with a panoramic clothing of applications, pliant licensing policies hit been matured to alter the different needs of the utilization accord without restricting the aforementioned to meet digit accepted license. Each covering utilization methodicalness haw garner the correct compounding of licenses that prizewinning meets its needs. The organizations haw also take added licenses or raise their licenses. Do I center someone yell ‘What most Open Source?’

This article has been contributed by (Mr.) Parveen Aggarwal, Technical Consultant to DSL India. With more than 6 eld of business undergo in Java and united technologies, he has an in-depth discernment of J2EE, J2ME and database direction systems. Parveen is currently employed on the construct of data-archiving in embedded databases. He crapper be contacted at parveenaggarwal@hotmail.com

Tags: , , , , , , , , , ,
Close
E-mail It