Tallan's Blog

Tallan’s Experts Share Their Knowledge on Technology, Trends and Solutions to Business Challenges

Posts Tagged "How To Guide"

MVC4 Makes it Easier to Create Desktop and Mobile Web Applications

Karl Schwirz

Last year I wrote an article that expressed the importance of developing not only desktop solutions but mobile ones as well.  Since then it has become increasingly important to present not only to a desktop market, but to a mobile one as well.
That said, this article isn’t about convincing you to move to a desktop-mobile solution.  The metrics in my previous article speak for themselves and have only gotten stronger in favor of mobile solutions as time has gone on.  This article is going to center on how you can easily achieve a mobile solution by leveraging your existing MVC 4 website and making a few configuration changes  to automatically render mobile views when a mobile device is detected.

Java 7 File IO using FileVisitor

Richard Krajunus

This blog post is inspired by a problem a friend of mine was having. See… he’s got this rash… -kidding. He’s got a ton of movies, music, and books on his hard drive, and he frequently rearranges the directory structure of his drive to better organize his media. He wanted to create snapshots of his folder arrangement so that he could refer to it later. This post highlights issues I had implementing a simple solution using Java 7s new NIO.2 package.

Parsing HTML using jsoup library

Richard Krajunus

A quick tutorial on html parsing using the jsoup Java library.

Java Spring Application on Azure Cloud

Richard Krajunus

Microsoft states to developers using  Azure that one can build applications using any language, tool or framework.  This blog post will show you how to deploy a Spring application on an Azure cloud.  Our first step will be to install a Jetty instance on to the cloud, and then we’ll import jars and do any necessary fine tuning to get our sample spring application on the cloud.
There’s a great blog post to get you started with getting a Jetty instance on the cloud that I want to refer you to: http://blogs.msdn.com/b/dachou/archive/2010/03/21/run-java-with-jetty-in-windows-azure.aspx
Next download a sample spring application.  I was able to get one at: https://src.springframework.org/svn/spring-samples/petclinic/trunk/
The presence of a pom.xml file in the root directory tells us that the project can built using maven.  Install maven if you don’t have it, and then run an mvn clean install from the root directory….

Java could be a pain to C# developers (Pass by Reference)

In C++ and C#, developers have freedom to modify variables by directly having access to memory location.
In C++,
#include <stdio.h>
void swapnum(int &i, int &j)
{
int temp = i;
i = j;
j = temp;
}

int main(void)
{
int a = 10;
int b = 20;
swapnum(a, b);
printf(“A is %d and B is %d\n”, a, b);
return 0;
}
In C#,
int a = 1;
modify(ref a); //now a=2
void modify(ref int a)
{
a = 2;
}
In Java, however, there’s no such thing as pass by reference. Even the so-called pointers (created by ‘new’ operator) are passed by copy of the reference.
Thus, if you do the following,
String a…

\\\