Monday, June 3, 2013

Old Java can learn new tricks from C, Android

Experts say the language should crib app isolation, locality, and automated parallelism from more modern sources.
 
Java and its linchpin JVM (Java Virtual Machine) still have much room to get better even after debuting 18 years ago, say experts who would like improvements in such areas as locality, application isolation, and parallel operations.

The JVM, which has provided a mechanism to run Java applications on multiple hardware platforms, could be fitted with capabilities similar to the C language's struct feature, providing benefits in locality by improving linkage between memory and processors. "[Struct] gives advantages in the area of footprint," and provides a lightweight object with fields and no methods.

Java and mobile applications in particular, meanwhile, could benefit from Google Android's "failsafe" capabilities enabling application isolation Automated parallel operations for the Java language and runtime are desirable. Lambda capabilities in Java Standard Edition 8 bring this closer to happening via an API, but it would like to see parallelism go a step further. "Ideally, what you'd like to be able to have is a language and a run time that you don't have to express it explicitly. It just figures this out automatically."

Friday, May 31, 2013

Why Cloud Development environments are better than Desktop Development?

Cloud development have some advantages over Desktop Development: They can be less expensive, simpler to manage, and easier to update and use. On the other hand, there may be reasons to keep your application on your desktop, including network bandwidth. The basic differences between applications that run on your desktop and similar applications optimized for the cloud, to help you choose how to access your applications. 

 

  • Software installation
    One of the biggest advantages to cloud applications is that no installation is required. You can avoid the time and effort required to download software. The cloud application is rendered in the browser, thereby exploiting the browser capabilities such as flash content rendering and CSS.

  • Resource utilization
    In cloud applications, most of the heavy processing is handled by the service provider, which minimizes the requirements on your system configuration. Desktop applications require high memory and processing speed for complex applications like graphic design.

  • Software updates
    Desktop applications need to be updated periodically. The desktop application prompts you to download updates or you need to manually update the software. Cloud applications are updated by the application service provider. 

  • Platform independence
    Desktop applications have to be developed for multiple platforms, such as Windows, Linux, Mac, and specific hardware. Since most cloud applications are developed to be used in a browser, they run on various platforms.
  • Networking capabilities
    One of the key advantages of the desktop application is its independence from internet connectivity and bandwidth considerations. Cloud applications rely upon the internet infrastructure for data transport and content rendering. 

  • Advertising
    You'll likely encounter advertisements in cloud based applications, while few desktop applications display ads within the application. This is not a technical issue, but the fact that bandwidth is a very important consideration in cloud application makes us consider wasted bandwidth that ads rack up.

  • Authentication and authorization
    Cloud applications use end-user information for a variety of reasons, such as tracking usage or delivering quality of service. We find many cloud applications offer premium users improved bandwidth, additional storage and other value added features compared to the features offered to users who do not have premium service. Most desktop applications require little if any authentication, and if they do, they will rely on the operating system to determine the privileges, with system administrator having full access.
  • Data storage
    In desktop applications the data is stored on your own computer, whereas in SaaS applications data resides in the server space allocated to you. Since most of the processing is handled on the server side, data needs to be transported to and from the cloud application service provider. This can impose a requirement for high bandwidth to accommodate frequent and large data calls to the cloud server.

  • Security
    Desktop applications have information on the internal details of a system, such as data storage location, encryption used, and user privileges. One of the biggest challenges in cloud computing is having lack of proper information on location of the data, recovery policy used, encryption method, and trustworthiness of the cloud service provider. Owing to these factors, users may hesitate to place highly sensitive information on the servers of third party cloud service providers.

Five C# Traps to Avoid

C# is an impressive and powerful programming language that serves both hobbyist and enterprise developers alike. But a tool as powerful as C# doesn't come without its sharp edges. Take a look five most common and most dangerous traps that developers will want to avoid when programming in C#.

 

  

C# 3.0 introduced the "var" keyword as a way to let the compiler infer the type of variable based on the expression used to initialize the variable. Don't fear the "var" keyword. It can save you time and typing.

Trap #2: Be careful with optional parameters

C# 4.0 introduces "optional" parameters. An optional parameter defines a default value to be used if the caller doesn't supply a value. In the past, the concept of default values for parameters was realized by overloading: When using optional parameters, the default "false" value was baked in to the calling assembly at compile time. Consumers of your utility library won't get the new default value unless they are recompiled. Be careful when creating public API's with optional parameters!

Trap #3: Deferred Execution in LINQ

LINQ makes querying of data so much easier than for/each loops with nested if blocks and other conditional logic. But remember that all of that fancy LINQ stuff is simply syntactic sugar over method calls. If you have cases where you want to ensure your LINQ queries are evaluated right away, convert them to a List via ToList(), or to an array via ToArray().

Trap #4: Overloading Methods in a base class

This is an interesting one that can trip you up if you're not aware of how .NET resolves overloads. The .NET runtime always favors the most-derived compile-time type. In this case, .NET will still call DoSomething(long). In general, you should avoid overloading methods defined in base classes.

Trap #5: Forgetting to unsubscribe from events

This has been around since the first version of C#, but still causes bugs from some people. the .NET runtime employs a very smart garbage collector to clean up objects in memory that are no longer used. It determines "used" by keeping track of what objects reference other objects. Once an object is found to not have any other objects referencing it, it's available for garbage collection and the memory can be released. Always make sure you unsubscribe from events you've subscribed to. It allows your unused objects to be collected sooner and puts less pressure on the garbage collector.

 

Thursday, May 30, 2013

Oracle updates NetBeans for HTML5


The new version of the IDE features code completion for HTML5, JavaScript, and CSS to make programming for mobile and Web apps easier.


With the release of version 7.3 of NetBeans, Oracle has updated the IDE (integrated developer environment) The new features to aid in :-

  1. NetBeans 7.3 allows developers to use the same IDE [to compose in] HTML5.
  2. NetBeans 7.3 also comes with a completely new JavaScript editor and debugger. The IDE also makes debugging Web interfaces easier.
  3. The IDE can offer code completion for the jQuery JavaScript library, and it can generate JavaScript code based on supplied Java REST (Representational State Transfer) requests.
  4. JavaFX projects can now work with JavaFX's FXML layout file format.
  5. NetBeans IDE is an open source IDE for Java, PHP and C/C++ languages.
  6. We can access on the Windows, Apple Macintosh, Oracle Solaris and Linux platforms.