Wednesday, June 10, 2009

I had a task at work to get a web page content (using System.Net.WebRequest) in order to send the data by demand by email or in other ways.

The web page holds contents like images and more that need to be send by email in order to display the html content properly.

In order to parse the html content and look out for the images in order to download them to the server manually (a thing that will cause a lot of regex work and parsing issues), I found a great open source module (by Sharon Djabnoun, my allrise.com teammate, recommendation) that called HTML Agility Pack. This is an agile HTML parser that builds a read/write DOM and supports plain XPATH or XSLT (you actually don't HAVE to understand XPATH nor XSLT to use it, don't worry...). It is a .NET code library that allows you to parse "out of the web" HTML files. The parser is very tolerant with "real world" malformed HTML. The object model is very similar to what proposes System.Xml, but for HTML documents (or streams).”

Now, the work on the html content will be very easy and fast – the only thing that I’ll need to do is to fine the images node, download the images to the server, set the directive of the image’s source and send the email with the attachments and the fixed URL content to point the new location of the images.

You can find it here.

Posted by: Eran Nachum (c)
Post Date: 6/10/2009 8:59:00 AM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Sunday, May 24, 2009

After seeking the web for a good ORM mechanism in regards of developing scalable and generic DAL + BL tier (or service), I bumped into a great article that tested the EF (Entity Framework) hosted in WCF service (SOA architecture).

You can read it here. A short summary of this post says that the EF is still premature and couldn’t perform complex actions (like updating multiple tables that doing some transactions).

Performance and Scalability are also has been tested and the results weren’t so good!

So, after getting some advices from friends and colleges I think I’ll use NHibernate in order to publish my ORM relations to the DB.

Any suggestions or comments to this will be complimented to my email.

Posted by: Eran Nachum (c)
Post Date: 5/24/2009 11:30:00 AM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Thursday, May 14, 2009

I was struggling the basic out-of-the-box datagrid control of Silverlight and it doesn’t do much…

After reading the silverlightshow.net site for some tutorials I revealed the amazing agDataGrid of DevExpress that makes life easier.

To read some more info about it go here.

Posted by: Eran Nachum (c)
Post Date: 5/14/2009 3:15:00 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Monday, May 11, 2009

Hi,

as I posted in my previous email in regards Silverlight 2, I’ve decided to use ADO.NET Data Services (After consulting my mate Josh Reuben – senior SELA consultant) in order to consume the data in a very easy and light way (by using its linq notation and light weight data bandwidth using JSON).

The only main issue that I encountered with the last few days I am exploring this (new for me) technologies is the issue of cross-domain preventing:

“ADO.NET Data Services does not currently support cross-domain communications. Cross-domain communications are supported with standard REST and SOAP services, but not with ADO.NET Data Services. …… This means that a Silverlight 2 client cannot talk to services exposed through ADO.NET Data Services if those services are hosted on a different domain than the domain that hosts the Silverlight client application.”

Quoted from John Papa post here.

Recently I followed up the the Astoria blog team and found that they created a great workaround that comes to give a solution for this issue that holt me these days using these data services because my application is distributed and need to be separated for a client and server.

Find it here.

The Astoria blog team is here.

Posted by: Eran Nachum (c)
Post Date: 5/11/2009 8:18:00 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Sunday, May 10, 2009

I am new to Silverlight 2 and starting these days to develop my first Silverlight application hosted on asp.net web application, which is going to be a large and complex management system for a new product of the company I am working for.

I going to use some new technologies from Microsoft house (like Silverlight, ADO.NET Data Services over WCF and Entity Framework), therefore I started to read some tutorials in regards these topics and must say that there are good tutorials on the web but I read a nice and long post: “Understanding WCF Services in Silverlight 2” that explains how to create WCF Service and more and more (which is quite basic for those that has some knowledge in WCF), but the good paragraph is the detailed info in regards the consuming this service in a Silverlight 2 application.

Check it out here.

Posted by: Eran Nachum (c)
Post Date: 5/10/2009 10:16:00 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Thursday, May 07, 2009

Hi,

Long time since my last post I know, but promise to start writing again soon; I am starting these days to write my first big Silverlight 2 application, so I think I’ll have plenty of stuff to share.

For now, great and convenient search engine from google to search MSDN contents (thanks to Erez Eden, my friend that keeps me on track with such nice things…)

You can check it out in the further and save it in your favorites: http://www.google.com/microsoft

Be in touch, promise, Eran.

Posted by: Eran Nachum (c)
Post Date: 5/7/2009 3:24:00 PM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Wednesday, January 21, 2009

Long time since I spent my words here (shame on me...), but I am in a middle of a great project that touches almost every MS technology: asp.net, WPF, WCF and even WWF. I want to talk here about known issue from Microsoft and not to innovate something but to share my frustrations in regadrs it.

Even WWF is a great technology, has very intuitive API and supplies fun of programming - which is very important these days (for me at least) it has a major disadvantage: VERY VERY VERY slow VS 2008 designer. I am talking here about very big WF that contains somthing like 15 state activities, which everyone of them holds very complex conditions, code activities, send & receive activities that exposed outside as a WCF service.

In the beginning (were I was young by 6 months) life were easy and the future sound even better, but this has been changed after more and more and more logic in the WF which turned it to be a WF monster that except of doing coffee it does almost everything...

My main insight in regards to it is to split every single state (also if it very small one) to a custom activities that each one of them (of course) will be placed in a seperate file and will hold all its logic. After it, in the main workflow file you could attach each one of them and combine the puzzle.

Click to read more: VS2008 Workflow Designer is Very Slow

VS2008 | WWF
Posted by: Eran Nachum (c)
Post Date: 1/21/2009 9:21:09 AM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #
 Monday, December 08, 2008

Hi,

ASP.NET 3.5 SP1 has browsing history (making bookmarking functional too) handling support built in.
Resently web applications become more and more ajax-style, it is important to keep that in mind and see where it is reasonable for use.

You can read about it here:http://msdn.microsoft.com/en-us/magazine/cc972638.aspx

It is a very recommended article for ASP.NET developers to read in general, It also reveals the ASP.NET v4.0 Ajax Template approach, looks really cool.

Posted by: Eran Nachum (c)
Post Date: 12/8/2008 1:14:44 AM (Jerusalem Standard Time, UTC+02:00)
Disclaimer | | Trackback   #