James Avery has started a new series of articles on VisualStudioHacks.com named "Ask The Pros". The first issue was about Visual Studio add-ins, the second one is about Debugging. This is a great read. It gives a lot of tips to help you make the best of the debugging tools offered by Visual Studio.
PageMethods for Visual Studio 2005 has just been released. This version offers the same support as the version for VS 2003, plus some additional features.
PageMethods proposes a new code model that enables well-defined URLs and simplifies working with hyperlinks for your ASP.NET sites and applications.
PageMethods enables reliable URLs.
Linking to a web page is very easy, both in simple HTML and in ASP.NET. Linking to a page that really exists, passing the right parameters, and parsing these parameters, is a bit different.
PageMethods takes care of your URLs. It proposes a solution to define structured URLs for each of your pages, as well as a clean and simple way to call them.
The idea is based on strict page inputs and declarative parameter binding. With PageMethods, each page exposes a set of methods that represent the different ways to call the page. All you have to do to start benefiting from sharp, reliable URLs is to add methods to your pages, and mark these methods with attributes provided by PageMethods.
Here is how you would declare a page method:
protected void DisplayCustomer(int customerID)
Here is how you would refer to the page declaring this method:
MyHyperLink.NavigateUrl = MyPageMethods.Customers.CustomerPage.DisplayCustomer(1234);
- Object-oriented approach for hyperlinks
- No concatenations of strings required anymore
- Strongly typed parameters
- Automated parameter handling
- Parameter validation
- Compile-time checks
- Code completion
- Integrated with Visual Studio
- Support for HTTP GET and HTTP POST (new)
- Support for arrays and custom objects (new)
Learn more on the dedicated site, where you'll find:
- an introduction
- a walkthrough tutorial
- details about the features and benefits
- and of course a page to download the product.
Don't forget to let me know what you think about the product, and what your experience with it is!
Here is the description of the project:
Because it is technology agnostic Rialto can be encapsulated in JSP, JSF, .NET or PHP graphic components.
The purpose of Rialto is to ease the access to rich internet application development to corporate developers. Ideally a Rialto developer have neither need to write or understand DHTML, Ajax or DOM code.
The target of Rialto is corporate web applications and not internet web sites.
The widgets include: forms, drag & drop, tree, data list with fix header and resizable columns, pop up, splitter,
Rialto enables single page interface application development. It is available as open source under the Apache License.
But you'd better take a look at the demo to get and idea of what it can do.
If you are interested to work on the .NET port, contact the project team.
Google Base is now live. You can go and play with it.
I am currently working on a similar project. I had the idea first, but Google somewhat was faster than me. But it will be different and a good competitor to Google ;-) Just wait some more weeks before I unveil it...
I've been playing with Google Maps, Ajax, and ASP.NET 2 lately. The result is a fun experiment: MapShares.
MapShares lets you place advertisement on a Google Maps map of the world. Just click on the map to select a corner of the Earth where you'd like to place your own image, text and link.
One day, if I have the time, I may try to explain how this site is built. If you need help using Google Maps or need a developer to implement Google Maps on your site, feel free to contact me.
In the meantime, let's give a try to http://mapshares.com
If you need to install Visual Studio 2005 on Windows XP without Service Pack 2, you can follow these instructions.
SP2 is not deployed at the client where I am at the moment, so Aaron's tips where useful. I'm sure it can help a lot of people in the corporate world.
Two months ago, I've been contacted by a lawyer who asked me, on behalf of his client - SUN Microsystems, to change the name of my site http://JavaToolbox.com.
As you can tell from the name, this site references the development tools and libraries, like SharpToolbox does for .NET, but for the Java world.
Now, tell me, is this site a blatant counterfeit of the Java trademark, as they say? Isn't my site about Java? Isn't it clear for everyone that this site is not related to Sun?
Have they even looked at the site? I don't think so. You know what? I believe that they don't care. They don't want to support people helping them doing business.
It's really funny to see how Sun behaves, compared to what Microsoft does to help us, the community, to promote and use their technologies. There are several links from Microsoft sites to mine, I've been named an MVP, I've had direct contacts with Microsoft employees, etc. The only contact I had with Sun: a lawyer!
On more thing: they spend a lot of money attacking individuals who are not able to defend themselves. But wait, isn't it strange that they do not attack big sites like JavaWorld, Javalobby, JavaBoutique, OnJava, O'Reilly Java, who do not even mention the Java trademark?...
Update: see also the discussion on TheServerSide.com et sur Application-Servers en français.
This is a followup to my post on the automatic reformatting of HTML/ASPX that happens in VS 2005. You'll be happy to learn that although it looks like it, it's not a bug at all but a feature...
At first, when you witness automatic reformatting like this, it feels like something bad happens (again). But thanks to Barry Tang and Scott Guthrie from the ASP.NET team, I'll be able to explain you why this happens. Let me try to summarize the rationale behind this...
What was happening in my case was that <li> tags that I had on distinct lines were all of a sudden all on one line after me changing something in the Design view and switching back to the Source view.
For example, when I had something like this:
it could become something like this after adding a letter:
The reason for this is that VS 2005 tries not to reformat your code, but it doesn’t want to change your page rendering as well. In this case, not reformatting the HTML source would change the rendering of the page in Internet Explorer (not in Firefox though). This is due to the importance of whitespaces in HTML.
In most cases, whitespaces are very important. Let's take another example. Let's say you have the following markup in source view:
If you go to Design view, you will see a whitespace between the two inputs. Now, try removing the whitespace between them and go back to Source view. In this case, if VS preserves the newline between the two inputs when we switch back to Source view, it will put the whitespace between the two inputs right back and that would just undo what you did in design view. That’s why whitespace rules take precedence over formatting.
Something that may be confusing though is the opposite case. If you have this in source:
<input /><input />
Then switch to design, then add a space between the two inputs, then switch back to source, what do you get?
Why is this happening? This is due to another rule: the default behavior for "empty" tags is to have a line-break before and a line-break after. You can see this or change it in "Tools | Text Editor | HTML | Format | Tag Specific Options".
When you know why it happens, there is no problem. But when you don't, which is highly probable when you first work with VS 2005, you have to admit that it's funny to see that when you expect to have your tags on separate lines you end up having them on one single line, and when you expect to have them on one single line, then end up on several lines!
I hope this explaination helps you to undertand why we can see some reformatting happen. I'm sure that for everyone who see this at work without this kind of explaination will think it a bug. But it's not, it's actually a useful feature. It's just that it's not an obvious one.
The thing you have to keep in mind is that ASP.NET and Visual Studio teams think that it is more important to preserve rendering. And I agree with them.
Microsoft's developer division is now engaging on MQ, a milestone that is post-Whidbey and pre-Orcas that will focus on quality.
This sounds good. A focus on quality is always good.
But Eric, are some of you working on the upcoming VS 2005 service pack? It's good to focus on quality at a high level, but a lot of small quick fixes are needed too, and much sooner than Orcas, please.
It would be good news to see Microsoft really commit on delivering patches for Visual Studio... this time. It's not good to delay fixes to major releases of the products. In the meantime, people are working with your products, and there are known bugs that could be fixed with intermediate releases or patches.
Of course, everybody knows about Google AdSense, the program that allows to monetize your web sites...
Well, now they have a referral program, hence the picture you can see on this weblog's menu.
Until now, I've been very happy with AdSense on my own sites and on this weblog. If you plan to use AdSense yourself, feel free to click on my referral banners. That would be nice :-)
I've just read an interesting post from Scoble (a Microsoft employee) where he writes that Google has disrupted the businesses of Yahoo and Microsoft.
This got me thinking one thing about Microsoft. For Microsoft employees, everything should be Microsoft and Microsoft should be everywhere.
The problem for them is that the world is moving so fast nowadays that they can't keep up and are lagging behind. Last time I saw Steve Balmer, he was all after Google and Yahoo. It's a real obsession, a blinding one I'd say. And we can now see the results and where Microsoft is heading.
How come Google is so strong nowadays? Did they try to copy something? Well, now they are, on some projects, because they can't stay in there own corner and have no choice but to compete with some other market players. But at the beginning they came with something disruptive (like Scoble says). Something that turned out big.
What is Microsoft doing lately? It is running after Google like crazy, trying to duplicate everything Google does (search, map, portal, etc.). The result: lower quality products, no innovation. Why can't Microsoft come up with something new, something original, instead of trying to be everywhere, and in the end going nowhere? Come on guys, you can do better.
If we look at live.com for example, it does not look good. No Firefox support? You gotta be kidding? Crashing IE? Great!...
Experiences like this will harm Microsoft's image. This company already looks like a follower. Now it will look like a bad one.
I am not a Microsoft employee, so I don't really care. I just find it interesting. It's fascinating to see all this happen from an outside viewpoint.
Update: Scoble has another post about the subject.
Windows Live: Scott Hanselman doesn't get it.
I don't need these products either, we have other products elsewhere.
But my point is that I'm not so sure the new "Windows" branding everywhere will be good for adoption...
This change is already happening for developers, as we noticed already, but I do not think that it's such a bright idea. I think it's even worst for web sites and general consumer products. How do you feel about search sites or webmail sites that are tied to the Windows name?
Update: I've just tried live.com... With Firefox: "Firefox support is coming soon. Please be patient :-)". Silly. But wait. With Microsoft Internet Explorer: "IEXPLORE.EXE - Application Error - The instruction at "0x63644648" referenced memory at "0x0000001c". The memory could not be "read". - Click OK to terminate"!!! No comment.
I thought one of the high priorities for Visual Studio 2005 was to get rid of the reformatting of HTML or ASPX code... But I was wrong! I am currently working with the RTM version, and to my great dismay, I can see that Visual Studio still kills my tags' layout and reformats it without notice.
This is really bad news. I thought we would be freed from this pain :-(
Update: the explaination is available.