Monday, November 20, 2006

The Fox is alive in Brazil!

Cesar Chalom comments on the Brazilian Visual FoxPro Conference held last week in São Paulo. Looks like it was a good conference. It shows that not only North America and Europe can put together well-run, well-attended conferences on VFP!

(Via Andrew McNeil)

Tag: Visual FoxPro

Wednesday, November 15, 2006

Joel on SQL Injection

Another good post by Joel Spolsky. This one I've seen myself happening often.

I work in a company where data security is taken seriously and that is the way it should be. We are very aware, and trained, as software developers to try to build our sites as secure as we can make them. I always look for common vulnerabilities in my code, SQL Injection bugs being one of the most common things I look for.

Not only I want to produce good and secure code, but I would have egg on my face if I failed a Penetration test (and we have those done often to our apps), by such a basic oversight.

Try what Joel did in sites that ask you questions to get you some data. You'll be surprised how prevalent this very serious bug is out there.

Joel on newfangled overpaid efficiency consultants

Joel Spolsky has a great post ("Oh, the emails you'll get...") on the Harvard, overpaid, big corporate consultants that come in, at great cost, to offer their golden insight.

Want to know how many big corporations get their priceless advice? Read on. It's true, I've seen it happen.

Good links to learn about Generics in .NET

The concept of Generics is old hat to seasoned .NET developers. While at the Connections conference last week, I attended Kathleen Dollard's session on it and was interested to learn more.

For those of you not familiar with it, Microsoft defines Generics as

"a feature in version 2.0 of .NET (not available in NET 1.1) and the
common language runtime (CLR). Generics introduce to the .NET Framework the
concept of type parameters, which make it possible to design classes and methods
that defer the specification of one or more types until the class or method is
declared and instantiated by client code
."

Sounds complicated, and it is, because Microsoft's explanation makes it so. Actually they are a lot easier to understand with the excellent series of articles by Charlie Calvert (here's Part I, Part II, Part III).

Charlie writes:

"Generics help developers write type safe code that is easy to reuse. They
help catch errors at compile time, rather than at run time. Generics make it
easier for developers to write code that is self descriptive. In particular,
they can help you avoid the confusing syntax and side effects involved in type
casting and boxing. When writing containers, they can also help you write one
class for use with many different types, rather than forcing you to write a new
class for each type that you want to handle."

There you have it. Don't use ArrayList in NET 2.0 as you used to in NET 1.1 Use generics instead.

See also:
Jesse Liberty (O'Reilly's Books) Intro to Generics

Sunday, November 12, 2006

German FoxPro Conference this weekend.

The 13th German Visual FoxPro Conference was held in Frankfurt this week. As always, the reports coming in speak of a great conference, one that unfortunately I could not make.

Read the reporting by the Universal Thread and by Rick Schummer (parts I, II and III). Congrats to Rainer for putting up a good show!

Tag: Visual FoxPro

Back from a good conference

Spent a week in Las Vegas at the ASP.NET Connections Conference. I heard the attendee count was about 4700. More than I expected, yet the organization, logistics and food were excellent for a conference of this size.

The venue was first class at the Mandalay Bay. Although I registered a month or so before and the hotel was sold out, they contracted the spill at the Luxor, just next door, which was fine.

There were several simultaneous conferences, as is customary with DevConnections, and the attendees are free to move between them. I spent most of the time in what interested me, mainly ASP.NET and Visual Studio 2005 conferences. I kind of skipped out of the main keynote early as it was a just a marketing blurb.

The main point of the conference was AJAX which I was interested in. The group keynote, by Scott Guthrie was excellent, as is customary with him. I always enjoy his presentations which are light on PowerPoint and heavy on demos and code.

AJAX (Asynchronous JavaScript And XML), is not a new technology, but an interesting one. Microsoft's "ATLAS" project codename, has been renamed ASP.NET AJAX and is almost ready to RTM (very soon). It basically allows you an easy access to creating client controls and client code (replacing DHTML and much JavaScript coding), and an ability to call the server from the client, without using postbacks. Note that postbacks are asynchronous which allows the website to keep running, (pages do not wait to load) while the call is being made and processed.

JavaScript is a nice client scripting language, that you can currently debug and step-by-step into with Visual Studio 2005, even with Intellisense support, but it is cumbersome and tedious to debug by hand.

Hint: If you want to put a breakpoint into a block of JavaScript just add the keyword: debugger in its own line where you want to break. The browser (IE) will stop (if you configured it correctly to allow debugging) and allow you to launch a second copy of VS 2005 and step through with intellisense.

All said, JavaScript gets to be a major headache once a program gets too big. Most developers (VB.Net or C#) are not trained in JavaScript and its nuances, and would rather not have to deal with it in too much detail. MS ASP.NET AJAX tot he rescue. It works on top of the existing Visual Studio 2005 IDE, with nothing extra to buy, just a simple download of the toolkit.

It comes with about 30 free controls ready made and ready and simple to use. Scott promised that within a short time there will be a much bigger offering from the community (open source) of maybe 50 to 100 extra controls). I attended all of Scott's presentations (there were several). You can see his slides and demos here.

He also had a great session on "Building and using a LINQ for SQL Class Library with ASP.NET 2.0, where he showed the latest on LINQ. Check it out if you are not familiar with LINQ (Language Integrated Query) which will be available next year in the new version of Visul Studio.

I also attended sessions by Kathleen Dollard, an old friend and VB MVP, on Generics in .Net
Kathleen saw me the first day, wearing a Visual FoxPro 9.0 T-shirt and came to me: "Alex, why are you wearing a communist shirt?". "At least I was not an MVP for a dead Language and had to switch to Visual Fred, Kathleen".

The sessions by Dino Esposito on Middle Tier in .NET and another one on Design Patterns were very good. Dino gave a link to a nice complete code sample on the Northwind Starter Kit which shows a middle tier and creates objects to conform to Northwind sample database provided with Microsoft's products.

I saw my friend and fellow MVP Rick Strahl and attended one of his sessions on AJAX. As always an excellent speaker who knows web-development inside-out.

Spent some time in the trade show, especially at CoDe Magazine's booth, visiting with friends Marcus Egger, Ellen Whitman and Mike Yeager.

All in all , a great conference and a great time in Vegas. As an aside, I had a mishap where I stupidly lost my camera. As many of you know, I am a photography enthusiast and my camera was not a cheap one. I spent countless time with American Airlines lost and found to no avail. Bummer.

Note: Also check these good articles on AJAX by MSDN, Scott Guthrie, 4Guys from Rolla.

One issue I have with this Conference (and most other conferences I've been to), is that, after reviewing the CD and material provided, there is a lack of information. I am accustomed to the way we do conferences in the Visual FoxPro world, where all presenters provide a whitepaper, besides the stack of slides and code samples (see this excellent analysis). Most presenters in this conference did not provide any more than a copy of their stack (exceptions are Rick Strahl and Scott Guthrie among the few). Considering that the thick book you get is mainly a printed copy if the stack, with lined space to write in your notes, what is the point of repeating that on the CD, without any other comment or clarification? The point of the material provided (which we paid for), is to be able to see an article explaining the concepts, and hopefully some code samples to go along with it. Considering that you cannot physically attend all of the tracks and sessions, it is more important to leave you with decent and accurate material.

Sunday, November 05, 2006

Out this week in Vegas at DevConnections

I'll be out this week in Las Vegas at the 2006 DevConnections Conference (ASP.NET Connections and VS 2005).

I'm doing a lot of work in ASP.NET (C# 2.0) lately so it's good to keep up to date. I only use .NET for web work (webforms) and still use Visual FoxPro (VFP 9.0) for Winforms.

.Net data handling is good but it is still not a fast and easy to use RAD tool as VFP is for Winforms (fat client).