April 2003 - Posts
I’m borrowing a line from a famous New Jersey Tourism Campaign, but it definitely fits. For such a small state, and so far from the Silicon Valley or Redmond, New Jersey has a thriving .Net User Group community. Besides the opportunity to go to User Groups in New York City, the residents of New Jersey 2 established .Net User Groups (one in North Jersey, and one at the local MS office), there are a couple new User Groups starting up. NJIT has created a group dedicated to the college crowd, there’s a FoxPro/.Net Group for the FoxPro crowd, and it looks like a Central New Jersey group will be joining the ranks soon. With all of these User Groups, it looks like the future is bright for .Net in New Jersey.
The SharpVectors project will be represented at the SVG Open the following presentations:
Introduction to the SharpVectorGraphics Project
Authors: Don XML & Kevin Lindsey
Developing SVG Applications with Microsoft.Net and SharpVectorGraphics
Author: Don XML
Other notable presentations:
Keynote -- SVG: Where, How, and the Real World
Author: Tim Bray
SVG Scenarios Using Microsoft Visio
Authors: Richard See – Microsoft
Stella Du – SchemaSoft
Blair Shaw – Microsoft
Author: Kurt Cagle
Full Day Course - Advanced SVG Programming
Instructor – Kurt Cagle
I can’t wait. It should be a lot of fun, and it will be good to get together with some of the folks I know only thru the net.
The following question was asked on the WinForms Discussion Group:
I think I wrote something about a graphics wish before, but it was way more advance than this one.
It will be nice if there was software or a part of Visual Studio.Net that acts like a graphics program were you can draw drawings and those drawing to be converted to code, and resource files.
So instead of spending long time drawing some parts of a custom control using the code, I can do the same thing much more faster using Visual GDI+, and use the automatically generated code.
Someone suggested metafiles, but I replied:
Actually, you can use something alot easier, and a bit more dynamic, Scalable Vector Graphics (SVG). SVG is an XML based language that discribes graphics in terms of vectors, and is very similar to GDI+. But there is no MS SVG to GDI+ rendering engine. So a group of us got together and created an open source project called SharpVectorGraphics (aka SVG# or SharpVectors). You can get a bunch of info off our site - www.sharpvectors.org, including a link to the code (currently on SourceForge, an open source site), and you can even demo it thru a web page I set up. There's a ton of code, a SVG DOM library, a SVG to GDI+ rendering Engine, and even a SVGPicture window that you can place in your WinForm.
We got most of the static SVG stuff done, and are working on Scripting and Event support (but that's alot more that what you were looking for).
What can you do with this now? Create graphics on the fly using SVG templates. If you have a SVG template, you can take a data source and dynamically add more to the XML, and then pass it into the render and get back a GDI+ Graphics object completely rendered. From there you can do what you want with it. I use this method to create labels with bar codes dynamically, and then either render to the window, or to the printer.
Another cool thing about SVG is that it is supported by Adobe Illustrator. So you can let your graphic artist use there native tools to create the graphic templates, save them as SVG and then use them in your app. This way everyone works with their natural development tools.
Not sure if this is fixed in .Net 1.1, (got to check) but if you use an ASP.Net TextBox control and set the textmode to MultiLine, it will generate a textarea tag. The bug is that if you set the size thru height and width attributes, it will convert them to a style attribute, but only for IE, not Netscape or Mozilla.
<asp:TextBox id="TextBox1" TextMode="MultiLine" runat="server" Height="200px" Width="200px"></asp:TextBox>
You get this in IE:
<textarea name="TextBox1" id="TextBox1" style="height:200px;width:200px;"></textarea>
But this in other browsers:
<textarea name="TextBox1" id="TextBox1"></textarea>
Which gives you a very small textarea.
The work around is to either use a CssClass, or make sure you also set the width and height via the rows and columns attributes. IE ignores them if you set height and width thru the style, and Mozilla uses them to generate the height and width.
If you want an example, just check out any comments page on this site in Mozilla.
Jumping in on Jesse’s Flash based RIA thread, my personal take on the Flash RIA issue boils down to one thing, Flash does not grok XML and paradigm change that XML brings once you do grok it. Don’t get me wrong, Flash is a very good tool for what it does, static (not data driven) vector graphics. Used in its traditional niche, it is a great tool, but to try to expand its role to building full fledged UIs, will only tarnish its reputation. I have the same problem with people that try to build SVG only web sites (and I love SVG).
Macromedia is correct in its judgment that the future desktop UI will be a vector graphics based one, but what they are missing is that it will a declarative vector graphics based UI, in combination with a couple non-graphics based declarative languages, all based on XML. The multi-namespace document is the future of the web, with true XML “browsers”.
Don Box and the other developers at MS get it, but the folks at Macromedia (specifically Sean and John Dowell) haven’t shown that they get it, Declarative Languages Rock. This is where the .Net framework excels. It was built from the ground up to make use of XML, not to just interpret it. XML is at the very heart of the .Net framework, not just an add-on library. That was the way the old VS 6 was, and COM was, and Flash and Java still are. In order to truly take advantage of the XML paradigm you have to start over from scratch, and build it back up, starting with XML. Once you have that, then you can start to take advantage of things like creating and using declarative languages to communicate across machine and platform boundaries.
There’s a great quote from Robert Heinlein that goes:
Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe, and not make messes in the house. ~Robert Heinlein, Time Enough for Love
and I think that it could be morphed it something similar regarding programming platforms and XML, but I can’t seem to get the words just so. Maybe someone out there can.
IMO, people just don't get custom controls yet. I think they will eventually get it, but it will take some time. At the moment, there is still very little information on the subject out there (I am helping with this, check back in a couple of months :D). There is the MS Press book (which is great), but otherwise, there is very little info available.
Developers still have a problem understanding Internet Explorer’s Behavior Technology (both Element and Binary), which is the client-side equivalent of .Net Custom Controls, and they have been out since IE 5.5. I have an Element Behavior Yahoo Discussion Group, which gets very little interest. I thought that with the advent of the server side equivalent, that Behaviors would take off, but a year later, and nobody groks it. The IE Web Controls in .Net is a great example of what can be done combining these two technologies, where you have a server-side object model that is mirrored on the client, and the two can work together to give a much richer UI experience (and even drop down from downlevel browsers).
And to make matters worst, you can not use custom controls in ASP.NET if you wanted to use the XML/XSL model of generating web pages. In a perfect world you could use the XML/XSL model to generate a stream that contains (X)HTML, along with custom controls, and ASP.Net would then render the complete page. This way you could encapsulate the logic in a reusable .Net library and keep the XSLT pretty simple (plus you keep the logic in one place).
I’ve got great examples of Element Behaviors on my old site, but they both use SVG and require SVG.
Stacked Bar Graph
The North New Jersey .Net User Group (N3UG) and INETA are sponsoring a Software Legends night, May 28th, at the Morris Plains, NJ Barnes & Noble.
From the latest N3UG email:
What is Software Legends Night?
Surveys were conducted by Microsoft, within the .NET community, to determine who most users consider experts/legends. The same 8-10 names kept coming to the top of the list, known as "legends". The Software Legends Night will be an informal QA session and book signing with two of these authors (still to be determined).
The content of each event is really up to the User Groups. This is really meant to be an informal social event for UGs around the country. The N3UG group is still waiting final confirmation on the speakers and location. More information to follow at the next Users Group meeting (May 13th).
Has anyone seen the current issue of asp.netPRO, and the cover article - 10 Rock-Solid UI Tips? Here’s the link to the article, but you need to have a subscription to see it. I’ve got a couple problems with the article, but my main complaint is Tip 1, Use SmartNavigation. SmartNavigation is supposed to eliminate the repainting of web pages between posts on uplevel browsers using a hidden iframe. If you have ever tried using SmartNavigation in your pages, you would find that it does not work if you are using a more traditional HTML/CSS page model (apposed to the VB-like model VS.Net tries to force you to use). Just do a search of the MS newsgroups on SmartNavigation, and you will see hundreds of problems with this technology, and a lot of recommendations that it should not be used (especially with external CSS). My problem with the article is that nowhere is it acknowledged that SmartNavigation is known to cause problems. As the author you have a responsibility to alert your readers to any known issues of the technology you are using, and this tip is very misleading. IMHO. use SmartNavigation in only the most basic WebForms, and becareful using it with any advanced browser technologies (i.e. Element Behaviors, CSS, Scripting).
Steven Livingstone commented (sorry not a blog entry):
Excuse my ignorance, but why on earth is Nestscape NOT supporting this right now?? Kurt's articles are *always* very good, but let's help him out!
I tried IE, Netscape and then Mosaic which game me a cool "http://www.macromedia.com/error/not_found.html" error. Yeah, coz that will help uptake.
Don is right, but let's force the issue!! Intro to SVG, but let's create a basic site using it?
There are quite a few SVG enhanced sites out there (www.battlebots.com being one of the first), but not many ASP.Net ones that I know of. THE place for programmers who use SVG is the SVG-Developers board. But SVG can be used for far more than just in a web page. I’ve developed apps that use it to dynamically create graphics from SVG templates (created via Adobe Illustrator), and then rendered to various outputs (different raster types, printers, PictureWindow). So even though it may look like a web only tool, it can be used in a lot of different ways.
But the big future of SVG is as a UI tool, especially as the UI for the OS. There have been rumors that MS is looking towards a vector graphics based UI for a future OS (but lets remember that rumors are just that, rumors, and not go overboard on speculation). IMHO, this is where we are headed, a multiple namespace rendering engine that contains namespaces similar to XHTML, SVG, SMIL, XLINK, etc. all rendered in something like a XML browser. It seems like the logical progression of the idea of a web based OS, with just a XML browser as the user interface. If you get a chance check out the XSmiles project, which is building an XML Browser with some of the features I mentioned in this blog, but not nearly useful as an UI for an OS. But playing with this experimental software has given me some very cool ideas of the possible future of the web.
It has come to my attention that there are some folks out there that are confusing me with another Don (Don Box). Yes the name Don is not a very common one (but it is not rare), and what’s the odds the both are into XML? Well, it doesn’t really matter, because it did happen.
I’ve had this nickname for a long time (in internet years that is), and even have a book credit with it, so I can’t really change it (plus my last name is way too hard to remember). But to help solve the problem, I changed my Blog title, so that it will be less confusing. I even change the subtitle (but you will have to go to my blog site to see that), that includes a bit of Jersey humor. If you’ve got a problem with it, I’ll send one of Tony Soprano’s boys over to help you figure it out.
More Posts Next page »