Wednesday, February 29, 2012

A little framework for TCP client-server communications (part1)

Hello world! I'm back from work and now it's time for requiem... :)

Today I wanna talk about a little framework written in Java for managing tcp/ip sockets connections.
Why I need a framework such this and what can I do with this framework ?

Remember that a good framework is very useful if can save you a lot of time/money on writing a lot of code. I think that JRR (Java Request Response) has a big potential and if you have to write an application,on every kind of device that supports internet, you should try it and see how it's simple to manage it all

Zooming out on features: with JRR you can:

  • Enstablish a Server that listens on a port; Provide your own implementation of handling client messages and server response. Also manages timeouts.
  • Create a Client that send requests to server, and handles response, exceptions, connection timeout and custom response timeout. 
P.S. If you don't provide your implementation, classes have their own.

Want to know more? Keep scrolling this post...

Thursday, January 26, 2012

Getting started with Lamba Expressions

C# 3.0 brought so much news (for example var, extensions ,LINQ, lambda expressions etc...).
Sometime companies have its reason to don't update .NET framework in their applications.
For this, developers who grow parallely to those applications, never have time to upgrade their knowledges.

I know companies that use 2003's IDE in 2011!

For those who never had a chance to see what's new in latest framework, like me, I dedicate this post.

What is a lambda expression and what can I do with it?

It's "an anonymous function that can contain expressions and statements, and can be used to create delegates or expression tree types" (msdn).

Thursday, January 19, 2012

Manage a Database in Android


Today we will learn how to manage a database in Android using native SQLite libraries.


Tuesday, January 17, 2012

Invoking a method from its name

A few weeks ago I showed how can work a simple Server.
My client sends a pre-formatted string with the method to call and the parameters, my server processes the string and calls the correct method.
But how it can be?

Change!


I decided to change my blog language from italian to english.
I want to do this because I (finally) realized that write notes, code snippets, and comments in italian is useless for the web.
Internet community help me everyday for my development problems, and I wish to follow its example.
How can I be visible if I write my posts in a unknown language?

That's so.

The main problem is that my english is very bad... :)

But I hope in an improvement... :)


See you soon!

Thursday, January 12, 2012

Activity Template

Stiamo sviluppando la nostra applicazione Android e vogliamo che nelle nostre activity abbiano, per esempio, un header fisso e ovviamente non abbiamo intenzione di copia-incollare il codice in ognuna activity? Questo post vi può aiutare :)

Se ci pensiamo un secondo è una cosa banale: alla base della programmazione ad oggetti. L'ereditarietà.

Ci basta creare un activity contenitore con il nostro header definito e una "zona da riempire" (un layout vuoto).

Syntax Highlighter in Blogger

Effettivamente il modo con cui postavo il codice,oltre al codice stesso, ha sempre fatto un po' ridere...

Visto che su Blogger non esistono plugin simili (credo) come in WordPress per mettere in risalto le righe di codice postate io da ignorante utilizzavo questo tool e successivamente applicavo "a mano" i colori.

Il codice è abbastanza visibile ma per me ogni volta diventava un peso stare li a evidenziare stringhe, commenti ecc...
E lì che per caso noto Syntax Highlighter! Un progetto Javascript opensource, forkabile in Github, integrabile su praticamente tutti i blog compreso questo schifo di Blogger :)