December 2004 Entries

Evaluating Expressions in C#

Yesterday, I posted an answer to a question on Code Project dealing with evaluating expressions in C#.  The person who asked the question wanted to know how to evaluate expressions with an eval() function (like the one in JavaScript/JScript). After playing around with some code snippets, I came up with the following answer: using System; using Microsoft.JScript; //Microsoft.JScript.dll using Microsoft.JScript.Vsa; //Microsoft.Vsa.dll string expr = @"  var x = 11;  var y = 'A';  var bEval = false  if ((x > 10) && (y == 'A'))  {    bEval = true;  }  else  {    bEval = false;  }"; VsaEngine engine = VsaEngine.CreateEngine();object o = null;try{  o = Eval.JScriptEvaluate(expr,engine);}catch(Exception e){  Console.WriteLine(e.Source);  Console.WriteLine(e.StackTrace);} Console.WriteLine(o); //Outputs 'True' to the consoleConsole.ReadLine(); Enjoy the code!

posted @ Friday, December 31, 2004 10:51 PM | Feedback (14)

Generating Code with .NET

This article dates back a couple of months (seven to be exact), but topic covered is well worth it.  There are other tools out there for code generation (such as CodeSmith) that help with the generation of basic objects.  But the nice thing about the method described in the article is that you could use the same XML Schema to pull data from SQL Server and with a little XML Serialization magic you could populate the object in a flash! Hopefully, I will have some spare time to write a simple article (maybe for CodeProject) that shows you how to do this.

posted @ Wednesday, December 29, 2004 12:20 AM | Feedback (5)

J2EE Development with Eclipse & Tomcat 5.0

Recently, I've been working on a J2EE web project using servlets and basic HTML files for uploading data.  I currently use the Eclipse IDE for all my Java development (Console & GUI).  However, Eclipse does not natively support J2EE which put me in a bit of pickle when it came to this project. Fortunately, there's a plug-in for Eclipse that allows you to do J2EE ... and best of all it comes with a 30-day free trial!  It's called MyEclipse IDE.  One great feature of the plug-in is the built-in server deployment and debugging.  This plug-in supports Tomcat, JBoss, WAS, just to...

posted @ Monday, December 27, 2004 8:26 PM | Feedback (5)

ASP.NET Performance Tips

While under the ASP.NET section of MSDN, I bumped into this article about improving performance of ASP.NET web applications. At times when designing web applications we ignore performance because of all the 'extra work' it adds to a project. Following the simple rules in the article, will help aliviate some of the performance pain.

posted @ Thursday, December 23, 2004 11:45 PM | Feedback (2)

XML & SQL symbiosis

While looking at this article on MSDN about the new features of ADO.NET 2.0 and SQL Server 2005, I was very pleased that finally we are started to look at XML as an independent technology rather than just data between < >. This article gives a brief show of the new XML SQL Type and how it can be used by client/server applications to make future SQL Server '05-dependent applications even more kick-a**.

posted @ Monday, December 13, 2004 10:51 AM | Feedback (4)

Is the end coming for C#?

Today, my dear friend SharpReader brought me back an interesting post with an interesting correlation.  Have a read and tell me what you think ...

posted @ Thursday, December 9, 2004 9:25 PM | Feedback (20)

Code Project Fun

I am not sure if any of you know this, but I'm very involved in our local .NET community.  I'm currently the Program Chair for the Iowa DotNET User's Group (IADNUG) based out of Des Moines, IA.  My main responsibilities are arranging meeting topics, guest speakers and maintaining member resources.  Prior to working with IADNUG, I was involved in doing 'Tech Talks' at Iowa State University, where we tried to preach the '.NET word' to CS, CprE and MIS students. One of my goals is to become more involved with the 'online' .NET community.  During college, I was involved with DevHood...

posted @ Wednesday, December 8, 2004 10:05 PM | Feedback (5)

Learning Enterprise .NET from J2EE

A while back, Sun Microsystems' Java architects published a book entitled, Core J2EE Patterns.  In this book, they covered some basic enterprise patterns for building robust J2EE applications.  For example, if you want to attach some pre- and post-processing of web requests to your application, the books suggests that you use the Intercepting Filter pattern.  Another good pattern, one that we in the web-world are very familiar with, is that of Model-View-Controller (MVC) or Service-to-Worker.  This patterns allows you to break your web application to fit a nice three-tier architucture in which each layer is independent from each other.  The interesting thing about this pattern is that...

posted @ Monday, December 6, 2004 10:05 PM | Feedback (4)

Heartland Developer Conference a huge success!

Well, the long awaited Heartland Developer Conference (HDC) took place today here in sunny, Des Moines, IA!  The turn out was great!  All of the speakers did an excellent job with their presentations!  A big thanks to Joe Olsen, Kent Tegels and Jeff Brand for all of their efforts into making this happen! Some of my highlights from the HDC were Rocky Lohtka's keynote speach on SOA, Sam Gentile's in-depth look at C# generics.  Man, those two presentations were the meal that satisfied my geek-hunger. Plans for HDC '05 are underway and a brand new concept called the Heartland Developer Network (HDN)...

posted @ Friday, December 3, 2004 6:55 PM | Feedback (4)

One down, four to go...

Today I had one of many exams to come on my way to MCSD certification. Today's exam was that of MCAD/MCSD 70-315, Developing and Implementing Web Applications with C#.  The exam was not too bad, questions were tricky in the sense that at times it was hard to make out what they were asking.  The exam was 43 questions with a 2 hour limit for completing. The next exam on the queue, is that of MCAD/MCSD 70-320, Developing XML Web Services and Server Components with C#.  The topics for this exam include, XML Web Services, of course, Serviced Component, COM Interoping,...

posted @ Wednesday, December 1, 2004 7:07 PM | Feedback (4)