Thursday, January 10, 2008

Is Google is so kind or what? One more great tool and FREE of course that leashed by Google is the Google Chart API.

By their introduction, The Google Chart API returns a PNG-format image in response to a URL. Several types of image can be generated: line, bar, and pie charts for example. For each image type you can specify attributes such as size, colors, and labels.

If you want to generate charts, graphs, pies etc. this is a great tool for you - the web developer. This tool gives a good fight to all other charts generator like .NET Charting for example and other unwanted ActiveXs modules that need to be installed on the client (we always want to avoid this action - at least me), because it is FREE and also because it is Google.

So I already generated myself:

chart

You can find it here.

Code | HTML | Other
Posted by: Eran Nachum (c)
Post Date: 1/10/2008 7:47:56 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Tuesday, January 08, 2008

While search some interesting and innovating technological stuff on the web, I bumped into 2 articles regarding performance comparison between the classic .NET Remoting (published by Microsoft some years ago) and between WCF technology that ships as part of the .NET Framework 3.0.

The first one has being published by Marcin Celej that claims that: "Sending DataSet with .NET Remoting is faster (in any of cases I tested) than sending it with WCF".

On the other hand, MSDN published also a comparison article, and the evidences were other than the above ones: "When migrating distributed applications written with ... .NET Remoting to WCF, the performance is at least comparable to the other existing Microsoft distributed communication technologies ... WCF is ... approximately 25% faster than .NET Remoting".

Graphs and schemes were published to illustrate the great findings by each one of them.

I am a fan of Microsoft technologies - I admit it, but this issue sounds interesting and worth testing not? What do you think about it?

Posted by: Eran Nachum (c)
Post Date: 1/8/2008 1:57:58 AM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Sunday, January 06, 2008

First a small introduction to the HTML 5 introduction; If you are wondering why I didn't published during the last 2 weeks, the reason is a great vacation in New York - in one simple word - Insane. (pics will be delivered on the following days).

Now to our topic - HTML 5. We all used to (and still) work and know greatly HTML 4 - which actually is exists something like a decade, but HTML 5 is stands in front of us (but is still to come - the work is still on progress according W3C) and comes to simplify our life (as client developers - side by side to the server hard work of course).

Indeed, HTML 5 will going to introduce a whole new set of elements that will make out lives to much more easier, also based on the fundamentals of HTML 4. The main innovations comes to replace the HTML 4 basic elements as DIV for an instance (which is one of the most used elements) with simplify elements that will use to represent the purpose of each one of them, like header, footer, section etc. - each one of then is a new well known element in the new language. A page rendered with HTML 5 could be shown like the following code snippet:

<body> 
   <header>...</header> 
   
<nav>...</nav> 
   <article> 
      <section> ... </section> 
   </article> 
   <aside>...</aside> 
   <footer>...</footer>
</body>

One of the new innovations is the language definition. It means that HTML 5 is being defined in terms of the Document Object Model (DOM) as a tree representation that will be interpreted by the browser. This definition came from the idea of separating the language itself from its syntax, which can be defined independently.

As we know from previous HTML formats (HTML 4), there are 2 kinds of syntaxes: the HTML itself which is serialized as plain HTML or XHTML which is serialized as XML.

The coin has two sides - each holds its benefits (you also aware of it right? ;)).

The benefits of using HTML 5 (which based on the familiar HTML) are the compatible of existing browsers and the second thing is the acquaintance of it by the authors (in our case - people like me and you!).

On other hand, using XHTML 5 will encourages authors to write well-formed markup, which some authors may find easier to maintain and Integrates directly with other XML vocabularies.

This is still under consideration, so we have to wait to the decision...

Some more tutorials and information regarding HTML 5 you can find in the W3C site here.

Code | HTML
Posted by: Eran Nachum (c)
Post Date: 1/6/2008 9:46:09 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Wednesday, December 19, 2007

I got a recommendation from my friend about great Israeli Jazz band. This band is called: thirdworldlove and i think that is one of the finest original materials bands that I've heard in the last year.

So if you're Jazz lovers/fans or even not, I recommend you about them.

Almost forget one more great thing, you can listen to their materials here just FREE.

Enjoy...

Life | Other
Posted by: Eran Nachum (c)
Post Date: 12/19/2007 11:33:53 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #

I Read very nice post that has written by Matt Berseth regarding debugging asp.net AJAX applications. In his post he examples  a tool that has been written by the YUI project team has developed and compares it to the Trace Console AjaxControlToolkit Control that belongs to Microsoft.

If you are a asp.net developer that uses AJAX extensions or even not, this post can help you debugging AJAX events and actions.

You can read it here.

Posted by: Eran Nachum (c)
Post Date: 12/19/2007 5:59:42 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Thursday, December 13, 2007

The reason I published this post is because I didn't find any result when googling the error description and solved it myself at last.

If you're asp.net developers you probably know the ObjectDataSource object, which represents a business object that provides data to data-bound controls in multi-tier Web application architectures.

I like this object, most of the time this object can solve you all the annoying steps logic of calling the BL/DAL object in order to retrieve the data and populate the wanted presentation control.

On one of my working on website's pages (which is quite complex one that knows to list data from several sources and procedures), I am using such of object as a data source in the main GridView that renders a list of records. In order to interact with each different select method I had to set every time the SelectMethod property and it's specific parameters in the code-behind. Until now everything is just fine...

It seems that working this way affects the other postback events on the page, (because after event postback, the OnInit and OnLoad events are being called first and just after it the event handler itself is being called), here my page was crashed and gave this error message: "The Select operation is not supported by ObjectDataSource '<objectdatasource_id>' unless the SelectMethod is specified."

This error caused because the page expected the SelectMethod property to be initialized between the OnInit and OnLoad methods and just after it the rest of the events.

The resolution is quite easy in this case;

First, you need to remove the ObjectDataSourceID property definition from the control properties' definitions layout in the control source and set the DataSource for the control to the desired one in the OnInit method. After it, in the OnPreRender method call the control's DataBind method in order to bind the data source. This last action will allow to any event to happen and just after it to set up the Control (the GridView in my case) with data.

protected override void OnInit(EventArgs e)
{
   base.OnInit(e);
   MyGridView.DataSource = MyObjectDataSource;
}

protected override void OnPreRender(EventArgs e)
{
   base.OnPreRender(e);
   MyGridView.DataBind();
}

I hope it'll help anyone...

.NET 2005 | ASP.NET | Bugs | C#
Posted by: Eran Nachum (c)
Post Date: 12/13/2007 1:02:19 AM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Tuesday, December 04, 2007

This post comes as a continues to the previous one. I thought about some insights regarding this issue and in the bottom line, there are some significant disadvantages that I could think about:

  1. Get from the starter point that web application is stateless, this is the most important disadvantage - you cannot rely on that admit it or not.
  2. What about performance - like the former post, this kind of alive (web) service will grab a thread permanently from the application pool and we'll use it - this thing damage in a matter of time the performance.
  3. What about IIS reset action. If being done, the process will be 'dead' and this thing is worth to nothing because we can't rely on anyone to check if it alive.

The main conclusion:

Don't count on web application in order to run scheduled tasks - you can't rely on it in 100% (however you have tools that meant to monitor it).

I takes Ken Egozi's comment of creating a scheduled task (instead of windows service) that will do the scheduled job (I going to keep my local machine alive forever I think ;))

Posted by: Eran Nachum (c)
Post Date: 12/4/2007 7:00:48 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #

By the formal definition, Microformats designated in the first place for humans and just after to machines. Actually, this is a set of simple informational formats that based over generic and well unified standards. This set of formats comes to simplify common problems into a behavior and common templates (like XHTML, XML etc...).

The main goal of this formats is not to invent a new language or force these kind of changes over the 'world', however it comes to adapt a different way of thinking regarding storing information and publishing it to the world.

I going to apply this set of formats in my new web 2.0 working application. By doing it I can publish to a third level party data from my site easily in unified structure.

So what is the main different from what we have today?

Today we are using XML structure in order to keep data and to publish it or even publishing a specific  API that will explain the consumer the way she can retrieve the data. These kinds of solutions spends the developer's time that wants to get the data (she has to learn the API in order to use it); the Microformats comes to save up this time because it's a well know formats.

You can use RSS or some other feeds you'll ask not? In fact yes! BUT, these Microformats has a variety of patterns that help you publish extended unified structure data which supplies you more functionality.

Common standards are: hCalendar which supplies a calendar format in order to publish events, hCard which is a format for personal details card.

One more good advantage is search engines. Step by step, search engines crawlers starts to learn this kind format and knows to index this data in efficient way; this is also improves your site's SEO.

More details regarding it you can read here - http://microformats.org/

Posted by: Eran Nachum (c)
Post Date: 12/4/2007 11:26:01 AM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Monday, December 03, 2007

I have a problem (or used to have a problem...). In my working on web 2.0 startup, I bumped in a problem which in first thought looked to me as a simple one but after something like 5 seconds I figured out that it's actually a problem (or something to think about - I like this phrase much better ;)).

So after this introduction, lets introduce the 'something to think about' issue: I had to run each period of time a set of tasks in order to update some database statuses. If my web application was hosted on a dedicated server, this one had be solved very quickly; windows service - I guess you thought about it yourselves...

BUT, we are not going to host this web 2.0 application in a dedicated server (at least not now) and the scheduled task became a task itself, because (if you are web developers you'd better know) application is lives as long as there is at least one client that consumes it. When the last consumer is going home, also the application in going home to relax...

Now to the main question: how can we keep it alive?

After doing some thinking between me and myself, gathering up some good resolutions and not I thought about good one; in your web application create a web service that most of its job is to expose a KeepAlive web method that will return a dummy value and will keep the web application alive all the time and also will perform the tasks that you to establish for permanent period of time.

In your local PC, create a small desktop application in order to handle the tasks. This application will be a windows service that will run automatically under your machine every X interval and will ping the web service in order to keep the web application alive.

Note: the web service itself will know to execute the specific task itself every predefined period of time.

What about performance? This solution could affect your web application performance (I think that you know the reason why), in this case you can create another wen application that will be placed in the same server and all its job is to be kept alive and perform your tasks.

Any addition will be appreciated... I am going to write this web service now...

Posted by: Eran Nachum (c)
Post Date: 12/3/2007 6:01:39 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Sunday, December 02, 2007

Long time no written, I know.... I am quite busy these days at work and in my private time working on the web 2.0 startup with my colleagues.

I received an email from Kevin Gao, which is the leading developer of a nice source control software that called SourceAnywhere Hosted of Dynamsoft in order to check out their software tool. I decided to write about this tool, because this one is very suitable to me these days while working on my startup project. I actually needed a good source control in order to manage my code files properly.

So, some conclusions regarding this tool, after working with it close to a month. Let start from the important thing for small developers like me - this tool is FREE to use for up to 3 users, which can be suitable for small to medium projects with low number of developers.

The second thing that was fine by me is the interface of this software, which is very similar to the Microsoft source control (admit it or not - I am a fan of it... ;)), this gave me great a familiar navigation ability between the functionality possibilities and indeed there are some nice possibilities and abilities, like: users and groups roles management and managing your code files (the usual functionality such as rollback, commit, check in/out etc.)

The only disadvantage that I could think about here is a lack of files' state indicator. Dislike other source control tools that I worked with (like: Microsoft source safe control which indicates a file content changes or file state directly in the Visual Studio environment or the SubVersion control system, which indicates the file's state in in the actual file system folder), this tool doesn't indicates it and this is kind of annoying.

Generally I think this is a great tool to use it in order to manage your code version - again for small to  medium applications/projects.

You can read about it and download it free of charge (for up to 3 users of course) here. Have fun!

Posted by: Eran Nachum (c)
Post Date: 12/2/2007 7:45:40 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #