I'm not an expert but I got some experience around web development and I can say that ClientCallback calls seem to be very poor to me... I'm working around a real world example on my job, we are moving from VS2003 to VS2008, and I'm writing more code on VS2008 than with VS2003 and AjaxPro.

I guess the model that AjaxPro works on is more produtive and intuitive than the GetCallbackEventReference model used by ClientCallback.

Using AjaxPro we just add the attribute that a method is a webmethod and you could call it from your client code but in VS2008 things are worst. On my applications I need to look up on a database when a text if filled and the javascript onBlur method is fired. Then, an XML will retunr with or not some data and everything is right.

Well, that's for now... I'll keep working, maybe I can discover something that make me change my first opinion...

See you!@!

Chilá!@!

Recently, I needed to do a small update on a couple of sites, and, for my surprise, I realised that the control used to do the "page header hard work", was the User Control instead of the Custom Web Control.

OK, Certainly, the developer was under pressure and the easiest (and also quicker) way to solve the problem was writing the control this way. The couple fo sites were in SourceSafe too, so when I started to get local copys of the projects many versions of the "page header control" were created by SourceSafe. Just for your information there were "WebControl1",  "WebControl2", "WebControl3", "WebControl4", "WebControl5" and "WebControl6" folders created.

On the other side, because of cross domain (I guess), the ASCX file needed to be on all the projects.

In my opinion, controls that will be used for more the one project, should be Custom Web Controls instead of User Controls, but, that wasn't the point on that job. So, I rewrote the control as a custom one, and from now on all the developers will use just the reference to that assembly and add the control on the toolbox group they want. No more ASCX files needed to be copied over the projects and folders and more folders being created by SourceSafe.

See you and I hope that from now on, I'll post articles more often.

Chilá!@!

When I first tried to create a SQL Store for AzMan a message that the parameters I entered was incorrect. Looking and searching over the web, I discovered that, on the following window:

image

The Store Name must be something like:

MSSQL://Driver={SQL Server};Server={[TypeYourServerNameAndInstanceHere]};/AzDB/[TypeYourDesiredStoreNameHere]

On the MSDN Online, the last parameter "/AzDb/[TypeYourDesiredStoreNameHere]" was not documented. And that's it, if you follow this simple step, you will create and begin to store your AzMan configurations on the SQL Server, GOOOOOOOOOOOOOOOOOOOOOOOOOOOOD thing, isn't it?

See you and merry christmas...

Chilá!@!

VS2008 now uses the engine of Microsoft Expression instead of Microsoft Frontpage to create and edit the web pages you added to your project/web site.

The great new here is that now we'll handle CSS properties in a more efficient way and within more IDE support.

A good source of information for this subject can be found here.

If you can't see the toolbox , CSS properties or Manage Style windows/tabs, just go on View menu and select CSS Properties, Toolbox and Manage Styles.

Let's start showing up where it is.

image

If you take a look on the toolbox window (here it isn't docked on the IDE, it's floating), there is two more tabs on the bottom os the window. On CSS Properties you can see the CSS properties for a selected element on the page and also see some messages that will help you to find out why that property is appearing in a wrong way!

image

This is an empty property, when you didn't select anything yet.

image

And this is the CSS Properties for an element selected on the page. Note that the background color is strikethrough in red. Don't worry, following I'll tell why this red strikethrough can appear.

image

And the image above shows up the manage style tab where you can see how a style will appear and add new styles if you want to.

As you can see, now we can visually know what's going on with the CSS's.

The red strikethrough.

As published by Peter Spada and Reshmi Mangalore, there are a few reasons on why a property is striked with a red line.

The code to reproduce these messages I'll paste at the end of the post.

1 - The property defined on the StyleSheet is been overriden by an inline property. If you setted a color property on your StyleSheet and on the element tag you write the color attribute, you'll see the red line and a message something like this:

image

2 - The property is overridden by a CSS rule. It means that the configuration you setted it's not being used because another CSS rule. For an example, you set the color attribute of a DIV tag to a desired color and then inside the DIV you put an element with a CSS rule diferent from its parent. When this happen, you will see something like:

image

3 - Property is overridden by a rule marked as '!important'. In this case, although you setted something a 'huge force' is setting it different. For an example, you got an element and this element has a CSS property seeted to its ID marked as !important. When you try to set a different style on the tag, you'll see:

image

4 - Property is not inherited or it's not inherited but may appear on some child elements. This happen when you set a property of a container element and add child elements on it. Some properties are not implemented on all elements but may appear. For an example the height of a DIV tag is not inherited by its childs as is the backcolor of a div also is not inherited by a button but can be shown thru a Paragraph.

image

Source Code!

Here is the html code I used to capture this post images. Just paste it on a page inside VS2008 Web Developer and select any of the buttons and Divs to see the above messages and images.

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>CSS Edit Tests</title>
    <style type="text/css">
     .MyStyle {color:Red; }
     .MyImportantStyle {color:Green; }
     #AnotherButton {color: Orange!important; }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Button ID="myButton" runat="server" Text="Click Here"
            class="MyStyle" style="color: Navy" />
    </div>
    <div style="color: Blue">
        <asp:Button ID="myNewButton" runat="server" Text="Or click here" class="MyStyle" />
    </div>

    <div>
        <asp:Button ID="AnotherButton" runat="server" Text="Or click here too" style="color: Purple; " />
    </div>

    <div style="height: 66px;" >
        <asp:Button ID="AgainAnotherButton" runat="server" Text="Or click here again"  />
    </div>
    <div style="background-color:Blue;">
        <span>What's up hun?</span>
        <asp:Button ID="Button1" runat="server" Text="Or click here again" CssClass="MyStyle"  />
    </div>
    </form>
</body>
</html>

See you.

Chilá!@!

...but I'll only return to post in a couple of weeks. My spare time has became really complicated now, but I promise that you'll see some good stuff soon...

 See ya!@!

 Chilá!

Hello everybody! I spent the last few hours to find out more about CascadingDropDown (CDD)  and I really didn't like what it really is.

The main question.

The requirements to make your CDD to work are just:

  1. NEED to use a web service (arghhhhhhhh);
  2. Write the method inside your ASPX page (code behind is a bad choice hun?)
  3. Need to learn how to pass values to and from the CascadingDropDownNameValue collection.

That's for me is a really bad thing. The one thing that CDD really does that's very nice is the automatic behavior handling of the parent's and children's DropDownLists. If there is no item selected on the parent DropDown, the children are automatic disabled and when you select a new one the children goes thru a two state os exibition, telling you to wait and when the requisition is over, tell toy to pick your choice.

I really didn't like it, as I said in the beginning and I intend to use the "normal" approach:

Yes, you may think that I'm a really bad guy, but in my case CDD doesn't help me on anything. I hope that someone else can find it usefull.

See you!@!

Chilá!@!

Well, here I am talking about ASP.NET AJAX again... This subject is so great that I could spend hours and hours on it, but let me say my first impression about it. I'm running my tests in a very slow machine with only VS2008 Beta 2, so quickless wouldn't be a problem hun? NO!!!!! I was surprised to see ASP.NET AJAX on action.

It's really lightweight, easy to learn and easy to deploy too!

I already coded AJAX on hand, handling the posts, creating the XMLHTTPRequest object and so on... you may think that I'm crazy, but I'll give you this tip, do it by yourself, one, two, ten times and you'll have an idea of how great is the work of the people that build AJAX Frameworks.

Back to ASP.NET AJAX, I'm very pleased to see that it's so easy that even ME (:P) can start coding without problems. The online documentation is great as is the software.

UpdatePanel and UpdateProgress are great and really can save your time as well. If you already tried it, you know what am I talking about but if you don't, download it and see it in action. It's amazing.

Well, on the next posts I'll start to put some code about my ASP.NET AJAX experience, so, came back to see it!!

See ya!@!

Chilá!@!

I heard a lot of developers saying that they will move some function to AJAX, that's better, quick, WEB 2.0 etc etc. But one thing we must keep in mind before deciding is where I'll really have benefits moving to AJAX?

I usually point somethings to my friends about AJAX adoption. You'll really improve your system and your user experience if:

  • The function does not infer on the rest of the page, for an example, loading a list of cities based on the selected State.
  • Business rules checking. Why let the user post the data if you could know before the post that something's wrong? This will help users bandwidth and experience as well.
  • Dynamic bahavior of the page based on user input. Again, the same reason of the above item.
  • Large page post backs. If for any reason, you got a really large page, you should think about moving the persistence to AJAX. I say this because of an issue me and one friend found. The large page, causes a large post and just the post back, without any persistence method was very slow. When we moved the persistence to AJAX, the performance was incredible!

As you can see it's not always that you will really improve your system quality, performance and user experience. But you must be aware of just move on AJAX for move. If there isn't a such good reason, then the move will be a waste of time and resources.

Did you improve your application with AJAX? Do you think it was a correct or a mistake move? Tell me, leave your comment!

See ya.

Chilá!@!

I have seen a lot of talk about Microsoft's new product, Silverlight. First of all, its name is a very funny joke with Flash. Have you ever thought which color is the light os your camera's flash?? Well, when you take a picture, a silver light just blink to make it all clear on the pic, funny, isn't it? So is Silverlight a real adversary of flash?

If I have to bet, I would put my coins on Silverlight. The integration with .NET  Framework will just make things easy. Have you ever tried to write a flash animation with some logic on it? If so you know that you have to lear the flash's native script language. OK, learning something it's not so bad, but if you can write the same thing with a language you know and often use.

I'll write somethings using Silverlight on the next days and when I'll post here my first impressions but, as far I know, it's an amazing product and its integration with XAML will just make things easier for us!

Tell me what's your opinion about Microsoft Silverlight.

That's all...

See ya!@!

Scott Guthrie, posted today that on Visual Studio 2008 we will be able to debug inside .NET Framework base class libraries. This will be possible, because the .NET Framework 3.5 will be delivered with source code. This is a great big feature that will help developers to debug inside a .NET Framework Class.

I'm not sure if that will be such a great thing or not, I usually debug my applications to find some errors on it and not to find some errors on the Framework, but, let's see where and when we can use this. For curiosity purposes that's great, but, for the day-by-day work I don't see a clear use of the .NET Framework source code.

Click here and read the full Scott post! 

See ya!@!

Chilá

More Posts Next page »