Skip to main content

Posts

What is perl.com? pm.org? perl.org? cpan.org?

Perl.com at http://www.perl.com/ is part of the O'Reilly Network. The Perl Foundation is an advocacy organization for the Perl language which maintains the web site http://www.perl.org/ as a general advocacy site for the Perl language. It uses the domain to provide general support services to the Perl community, including the hosting of mailing lists, web sites, and other services. The web site http://www.perl.org is a general advocacy site for the Perl language, and there are many other sub-domains for special topics, such as http://learn.perl.org/ http://use.perl.org/ http://jobs.perl.org/ http://lists.perl.org/ Perl Mongers uses the pm.org domain for services related to Perl user groups, including the hosting of mailing lists and web sites. See the Perl user group web site at http://www.pm.org/ group for more information about joining, starting, or requesting services for a Perl user. http://www.cpan.org/ is the Comprehensi...

What is service-oriented architecture?

Service-oriented architecture (SOA) is an evolution of distributed computing based on the request/reply design paradigm for synchronous and asynchronous applications. An application's business logic or individual functions are modularized and presented as services for consumer/client applications. What's key to these services is their loosely coupled nature; i.e., the service interface is independent of the implementation. Application developers or system integrators can build applications by composing one or more services without knowing the services' underlying implementations. For example, a service can be implemented either in .Net or J2EE, and the application consuming the service can be on a different platform or language. Service-oriented architectures have the following key characteristics: SOA services have self-describing interfaces in platform-independent XML documents. Web Services Description Language (WSDL) is the standard used to describe the services. SOA se...

Java 5 Feature: An intro to foreach

Looping is a control structure that has been around ever since we started programming. The good old syntax for looping that you would have used most often is: String[] messages = {"Hello", "Greetings", "Thanks"}; var length = messages.length; var int i = 0; for(i = 0; i System.out.println(messages[i]); } What if you want to iterate over a collection, like ArrayList? We will do something like: Iterator iter = lst.iterator(); for(;iter.hasNext();) { System.out.println(iter.next()); } The foreach was introduced to avoid introduction of any new keywords. The foreach introduced in Java 5 simplifies looping further. Let’s take a look at an example of how we can use the new way to loop: for (String msg : messages) { System.out.println(msg); } You would read for (String msg : messages) as "foreach String msg in messages". Within the loop of foreach, msg represents a String element within the array String[]. Instead of inventing another keywor...

Java 5 Feature: An intro to Autoboxing

With Java 5 (or Java 1.5 or JSE 5.0 or Java J2SE 5.0 or JDK 1.5), a new feature called Autoboxing has been introduced to the language. it is the automatic conversion of the primitives and wrapper objects. Boxing is to place a primitive data-type within an object so that the primitive can be used like an object. For example, a List, prior to JDK 1.5, can't store primitive data types. So, to store int type data in a List, a manual boxing was required (i.e from int to integer). Similarly, to retrieve the data back, an unboxing process was required to convert Integer back to int. Autoboxing is the term for treating a primitive type as an object type. The compiler automatically supplies the extra code needed to perform the type conversion. For example, in JDK 1.5, it now allows the programmer to create an ArrayList of int s. This does not contradict what was said above for List : the ArrayList still only lists objects, and it cannot list primitive types. But now, when Java expects a...

Google Browser Sync

Google Browser Sync for Firefox is an extension that continuously synchronizes your browser settings - including bookmarks, history, persistent cookies, and saved passwords - across your computers. It also allows you to restore open tabs and windows across different machines and browser sessions. Please note: Google Browser Sync must update your browser settings whenever you start Firefox. This will increase the start-up time of Firefox (the time between clicking on the Firefox icon and loading your start page) - please bear with us as we work to decrease this delay. How to Use To use Google Browser Sync, simply install and configure the extension on all computers for which you'd like your browser settings automatically kept in sync. Even if you only install Browser Sync on a single computer, you can use it to backup your browser settings and to restore your open tabs and windows across browser sessions. Configuring your computers After successfully downloading and installing the e...

To Ruby From Java - Similarities and Differences

Came through this interesting post comparing Java with Ruby. Java is mature. It's tested. And it's fast (contrary to what the anti-Java crowd may still claim). It's also quite verbose. Going from Java to Ruby, expect your code size to shrink down considerably. You can also expect it to take less time to knock together quick prototypes. Similarities As with Java, in Ruby... Memory is managed for you via a garbage collector. Objects are strongly typed. There are public, private, and protected methods. There are embedded doc tools (Ruby's is called RDoc ). The docs enerated by RDoc look very similar to those generated by javadoc. Differences Ulike Java, in Ruby... You don't need to compile your code. You just run it directly. There are different GUI toolkits. Ruby users can try WxRuby, FXRuby, Ruby-GNOME2, or the bundled-in Ruby Tk for example. You use the end keyword after defining things like classes, instead of having to put braces around blocks of code. You h...

HtmlUnit - unit testing framework for web applications

HtmlUnit is a java unit testing framework for testing web based applications. It is similar in concept to httpunit but is very different in implementation. Which one is better for you depends on how you like to write your tests. HttpUnit models the http protocol so you deal with request and response objects. HtmlUnit on the other hand, models the returned document so that you deal with pages and forms and tables. HtmlUnit is not a generic unit testing framework. It is specifically a way to simulate a browser for testing purposes and is intended to be used within another testing framework such as JUnit. Features Support for the HTTP and HTTPS protocols. ( JSSE must be in your classpath in order to use HTTPS support) Support for cookies Ability to specify whether failing responses from the server should throw exceptions or should be returned as pages of the appropriate type (based on content type) Support for submit methods POST and GET Ability to customize the request headers being sen...