7 Super Useful Application Servers For Developers

Application servers are usually essential software frameworks that are used by developers. There are many of these that are available. Here are some of the more important ones that are used popularly.


1. Wildfly or JBoss Application Server


This is an application server authoured by JBoss and developed currently by Red Hat. It has been written in Java and runs on multiple platforms.


2. Zope


This is a free and open source web application server that has been written it Pytthon.


3. Apache Geronimo


Apache Geronimo is an open source server runtime that integrates the best open source projects to create Java/OSGi server runtimes that meet the needs of enterprise developers and system administrators. Our most popular distribution is a fully certified Java EE 6 application server runtime.


4. GlassFish


This is an open source application server, which is also the official reference implementation for Servlets 3.0.


5. Zend Server CE


According to their website, this is "the fastest PHP server around".


6. JOnAS


JOnAS is a leading edge Java EE 6 Web Profile certified Open Source OSGi Enterprise Server developed by Bull and OW2. (Official Website)


7. Jetty


Jetty provides a Web server and javax.servlet container, plus support for SPDY, WebSocket, OSGi, JMX, JNDI, JAAS and many other integrations. These components are open source and available for commercial use and distribution. (Official Website)


Source : http://www.showsites.org/sites/developerfeed.blogspot.in

Variadic Objective-C Functions ( variable function parameters )

What are variadic functions?


Well, to be honest, I wasn’t exactly sure the name of these kinds of functions for years after I started programming. Just knowing the terminology will make your life a lot easier when googling for this same kind of thing in different programming languages.



In computer programming, a variadic function is a function of indefinite arity, i.e., one which accepts a variable number of arguments. Support for variadic functions differs widely among programming languages. (stolen from Wikipedia)



In the simplest of terms, it is a function that takes any number of arguments vs a function that takes a defined number of arguments.


iOS Library usage


There are multiple places that you run into variadic functions when doing iOS development. They are fairly simple to understand and use. The variable parameter can contain a comma seperated list of values and must be Nil terminated. Example below demonstratest creating a UIAlertView without any syntax



UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Title"
message:@"Message"
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"OK", @"Ignore", nil];


Implementing your own Variadic function


Using these functions is simpler than creating your own function that accepts a variable parameter. Much of the syntax and usage is inherited from C, so it may seem a little bit foreign if Objective-C is all you know. Example below demonstrates sorting any number of NSString’s.



-(NSArray*) sort:(NSString*) values, ...

NSMutableArray* sortableItems = [[NSMutableArray alloc] init];

if( values == nil )
return sortableItems;

va_list args;
va_start(args, values);

NSString* str = values;
do

[sortableItems addObject:str];

while( (str = va_arg(args,NSString*)) );

va_end(args);

return [sortableItems sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];



Explanation


The first thing to notice is the method definition. This is just syntax, but the ... signifies that this is a variable argument. The second thing is the nil check, values will always be a pointer to the first element of the variable argument, if the first element is nil we simply return an empty array.


The c-style stuff comes into play when you reach the va_list line. It is pretty simple, but you create a va_list and start reading from that list using va_start. I used a do , while loop because the va_arg function will move the pointer, and I wanted access to the first item. After you are done, of course, call va_end.


That’s all there is to making variadic functions in iOS


Source : http://www.showsites.org/sites/alexboyd.me