posts - 23,  comments - 346,  trackbacks - 2
  Wednesday, September 06, 2006

Again, just a link to an Atlas-based WF Designer, developed by Jon Flanders. Now we can try WF without instaling anything.

 http://www.masteringbiztalk.com/atlasworkflowdesigner/

 

 

  Friday, August 25, 2006

As you can read in Softwise:

"SAP has no explicit plans to create a SAP.Connector compatible with Visual Studio 2005. That is the reason why Softwise has developed a SAP Proxy Generator to create proxies  for SAP's BAPIS & RFC. This code generator is a Visual Studio 2005 Add-in that creates the source code, in C#, to comunicate with SAP (based on SAP.Connector.dll).

This Add-In is based on the SAP.Connector's XSLT files, which allows itself to create the same code that the SAP.Connector  for Visual Studio .NET 2003. Current version works perfectly for almost any kind of C# project: Web sites, Console Projects, Windows Applications and Class Libraries."

Download it here: http://www.softwise.com.ar/contenido.php?tag=sapproxygen

Read more in this article with few screenshots: http://www.codeproject.com/useritems/SAP_Connector.asp

------------------------------------------------------------------------------------------------------------------------------

I can't test it know because I don't have access to any SAP system in my current project, but in previous projects I had to connect to SAP from ASP.NET 1.1 and from Windows Mobile 5.0 with .NET CF 2.0, and I think it could be a good tool. If anyone can test it and give me some feedback about it...

Thanks.

 

  Tuesday, June 13, 2006

Hi all.

Just after knowing about the rename of WinFx to .NET 3.0, a friend of mine has send me this new site (at least for me) about.... .NET 3.0. Perhaps not the best name? Well, sure a good site.

http://www.netfx3.com/

Best regards

  Wednesday, May 03, 2006

Just a link to the original post that let me continue working without going insane :P. This is the first time I have to code with mobile devices, and I'm really lost. This kind of post save me lot of time.

Thanks!!!

Internet Connectivity from WM5.0 Emulator *without* ActiveSync

  Tuesday, April 25, 2006

An article from ScottGu's Blog, where you can download some slides and samples about new things in ASP.NET 2.0 that make web development easier. I've seen the slides and I've found them really interesting.... but I can't enjoy the samples yet (I don't have enought time).

The article: ASP.NET Connections Tips and Tricks Slides+Demos Posted

Hope you enjoy.

  Tuesday, April 11, 2006

With this little article I don't want to enumerate the common Best Practices in C# (there are so many articles and blog entries about it, and most of them are really good). I don't want to discuss about using StringBuilder instead of concatenating strings, Arrays vs ArrayLists and so on, I want to share with you some tips I'd learn in my short but intensive experience developing ASP.NET applications.

  • All C# Best Practices are valid for ASP.NET, use them.

I don't know why but I'd seen in several projects all pieces are really good except the user interface layer. The data access layer is always the best, with all OOP standards and best practices applied there, also happens with the business components, the horizontal components, the architecture.... What happens with user interface? Why we code ASP.NET pages in a different way? I know this is the most difficult layer for programmers, because you have to make a windows application in a web environment (bad design), using JavaScript to avoid traffic, showing and hiding controls depending on user roles, but this is not an excuse. I'd seen several times string concatenating in ASP.NET pages to build a script function, but never (or almost never) had seen it to build a dynamic query in the data access layer. Why?

  • Pages are also Objects.

Everything in .NET is an Object, but most of the code-behind classes I'd ever seen are poor designed. Thinking on ASP.NET pages like objects reduce requirements changes development effort, bug fixing and refactoring. Think you have a class that always invoke some methods from another class in the same order (this is the ASP.NET life cycle and the invoking class is the CLR) and, depending on user actions, one or more methods can be invoked in the middle of this sequence. You know exactly when each method will be invoked, so developing ASP.NET pages shouldn't be so difficult.

  • Properties, you can use them.

I know all of you had used properties in almost 100% of the classes you had developed. In ASP.NET pages I'd never seen a property, just fields. If you use properties to encapsulate and centralize the use of this fields (usually private fields) when developing ASP.NET pages you can improve your design and code will be more readable and maintainable. OK, you have a problem with properties in ASP.NET, you can't store the value of the property in a private field storaged in memory.... really? You can use ViewState, Session, Cache, Application.... instead of a private field to guess it. You can see an example in a previous post: Web Forms are also Objects...

  • Handling Events (No Business, just events).

When I say events I want you to think on control events (DropDownList.SelectedIndexChanged, Button.Click...). Events are the only way the user can interact with the pages, but this is design, no Business. I think is a best practice extracting the logic usually coded in the event handlers into private methods. You have a private method that adds a new row in a grid, but you don't care if this line should be added when the user clicks on a Button or when a DropDownList changes it selection. From this event handlers, you should invoke the private method to add the new row, but I think is better not to code directly in the event handler. Doing this way, changes in user interface will be easyer to develop.

  • IsPostBack… USE IT!!!

Every line of code outside an "if (!IsPostBack)" condition should be justified. Of course, if you're handling control events you're in a PostBack. I mean each line of code placed in the common life cycle methods (Init, Load, PreRender, Render...). This methods will be invoked in every PostBack, so you must be really sure that this line is really needed out of a not IsPostBack condition, or you will be executing more than required, loosing performance and increasing bugs (more lines executed, more bugs).

  • Don’t code for UI, code for Business.

If you think on Databases design, this is obvious. Lets apply it to the other interface, the UI. I think there are two interfaces in distributed applications, the Database and the User Interface. Just before store data, and just before show it to the user, we usually need to format it to the appropriate data type (or format). But we should avoid to use a string to store a date value just because Database need it or the user prefers to see it in a different format. I mean, use always strongly typed entities and properties all along your application, and make the needed changes as late as possible. Doing this way, you don't have to worry about the correct format of the string containing a date value. In the other hand, think the same way parsing input data from the user, but doing it as soon as possible.

  • Do the simple, do the best.

Notepad never fails. Word never...., sorry, I can't lie. I can put lot of examples that demonstrate this tip, but I think this is the easy one. The really difficult thing is not to forget it.

  • Read, learn and think.

IT world is moving quickly and get changes each day. You don't have to be an expert on each new technology (I think is impossible), but you need to know something about where IT trends. Just knowing several ways you can choose the correct one. I think is more important to know what it could be done than the way it could. If you know something can be done, you can ask your colleagues, Google, forums, blogs... I'm sure you will finally find a solution. If you don't know something can be done.... you can't find the way.

As you can see, this is not a standard Best Practices article. Feel free commenting each tip, I hope you do it to get a better final version of this tips adding to them all your knowledge.

Thanks for the time.

  Friday, April 07, 2006

Just a link to a Microsoft Event about MIIS and ADFS.

http://msevents-eu.microsoft.com/cui/EventDetail.aspx?culture=es-ES&EventID=118770800&EventCategory=1

I'll try to go, but I'll be in a new project and new company, so I'm not sure about it.

  Tuesday, March 28, 2006

Do you have any cool idea?
Do you want $10,000?

Visit http://www.madeinexpresscontest.com.

This contest is all about cool stuff you can do with Express. More info about Microsoft Express Editions on http://msdn.microsoft.com/vstudio/express/

  Thursday, March 23, 2006

I know the title is strange. Compilation error trying to execute a page? Well, continue reading and you will understand.

You know all languages in .NET are OOP languages, so pages in ASP.NET are also objects. When you compile an ASP.NET project, you just compile the code-behind code but, what happens with the *.aspx files? The code in this files is parsed to several *.cs files (one per page) and compiled on demand.

Trying to give a funny speech to my team about ASP.NET best practices, defensive programming, standards..., I began to play with a page and place a default constructor on the code behind. Nothing happens. Ok, is a class and it could have a constructor. You really can't do something useful here, but you can code it.

Try again with a private constructor. Compile the project and execute. Here you have the "Compilation Error executing ASP.NET Page":

Compiler Error Message: CS0122: 'DemoCharla.AspxWithConstructor.AspxWithConstructor()' is inaccessible due to its protection level.

As you know, in the @Page directive in *.aspx file you specify Inherits attribute. This really means that the *.aspx files inherits code-behind classes, but obviously, after parsing them to corresponding *.cs files and compiling.

Just one useful thing is that you can see the source code of the generated *.cs file in the error page, clicking in the "Show Complete Compilation Source" link This is the same as you can see in the "Temporary ASP.NET Files" folder behind \Framework\< version >\ folder. If you go there and look inside your folder project, you will find a folder with a name like 5e170680 (this name is always different, but have the same format) and inside this folder you will find another folder with similar name. Here is where all the temporary files are generated. You can see *.cs files, *.cmdfiles which contains necessary parameters for compilation, the *.out and *.err as a result of this compilation and more.

You can try and enjoy for a while seeing all this files, and executing a page and seeing csc.exe in the process monitor compiling pages for the first time. Isn't really useful but is what really happens "behind the scenes".

There's a good article in Code Project from Natty Gur: http://www.codeproject.com/aspnet/ASPXFILES.asp


 

  Tuesday, March 14, 2006

Sorry about the title in spanish but the events I'm gonna talk about are in Madrid (Spain), so I will post it in spanish.

Dos dias de conferencias para desarrolladores (29 y 30 de Marzo)

V Jornadas de Desarrolladores Microsoft (Dia 1)

- Team System
- ASP.NET 2.0
- ADO.NET y SQL Server 2005
- SQL Server 2005 y Business Intelligence

V Jornadas de Desarrolladores Microsoft (Dia 2)

- Gestion de proyectos
- Seguridad, seguridad, seguridad....

Podeis ver la agenda completa en los links que he dejado arriba. Yo ya me he apuntado, ahora solo espero poder ir.

Por cierto, casi se me olvida. Este jueves (16 de Marzo), tiene lugar la charla mensual del grupo de usuarios MAD.NUG, y esta vez podremos disfrutar de David Hernandez hablandonos de la Enterprise Library para .NET 2.0. Tengo el placer de trabajar con el y os aseguro que merece la pena escucharle. Os dejo el link para que os apunteis si todavia no lo habeis hecho.

MAD:NUG: Patrones con Enterprise Library para .NET 2.0

Ahora si, espero veros en alguno de estos eventos.