Nuno Filipe Godinho

Tudo sobre .NET e Arquitectura

Recent Posts

Tags

News

Community

Email Notifications

Archives

Junho 2008 - Posts

Desabilitar o UI durante o Partial Rendering / Disabling UI during Partial Rendering (PT/EN)

(PT)

Durante o post sobre os diferentes tipos de aplicações ASP.NET, falamos de um problema que aparecia quando utilizáva-mos AJAX Enabled ASP.NET Applications, e o problema era o facto de o protocolo HTTP apenas suportar uma chamada por pedido , e de forma a evitar perdas de informação durante a comunicação entre o Cliente e o Servidor, a melhor forma é desabilitar o UI durante o Partial Rendering, e de forma a efectuarmos isto existem diversas técnicas, como a colocação de um div na frente de todo o UI de forma a evitar que o utilizador seleccione outra opção durante a execução. Desabilitar os controlos de acções de forma a evitar a má utilização do UI, entre outros.

Está é uma dessas opções que achei bastante interessante a forma como o Scott Mitchell resolveu e explicou o problema, por isso dêem uma vista de olhos aqui.

(EN)

During the conversation about the different types of ASP.NET Applications, there was an issue that was talked when using AJAX Enabled ASP.NET Applications, and that issue was the fact that the HTTP protocol only supports single call by request, and in order to prevent information from getting lost in the communication between Client and Server, the best way is to disable the UI during the Partial Rendering, and in order to do this there are several techniques, like placing a div on top of all the UI in order to prevent the user from selecting another options during the execution. Disabling the action controls in order to prevent the user from misuse the UI, and some others.

This is one of those options and I found it interesting to see how Scott Mitchell solved this problem and explained it, so check this in here.

Escolhas no Desenvolvimento de Aplicações ASP.NET / Choices to Develop ASP.NET Applications (PT/EN)

(PT)

   Existem diversas formas de desenvolver aplicações ASP.NET, e tendem a aparecer cada vez mais de forma a que possamos escolher a melhor abordagem ao problema que nos é colocado, e por isso mesmo decidi escrever sobre este assunto.

   Com o aparecimento do ASP.NET 3.5 e até já com o ASP.NET 2.0 com as AJAX Extensions passamos a ter 3 escolhas para o desenvolvimento de Aplicações em ASP.NET, sendo elas as seguintes:

  1. ASP.NET Applications
    • Este é o tipo de aplicações mais conhecido, e que não utilizam qualquer elemento de AJAX ou qualquer outra coisa, apenas o "simples" ASP.NET, e poderiamos atingir esse desenvolvimento utilizando 2 tipos de desenvolvimento, que inclusivé são as opções disponibilizadas pelo Visual Studio no momento de iniciar o desenvolvimento, sendo elas:
      • ASP.NET Web Application
        • Aplicação pré-compilada e que tem algumas vantagens em termos de segurança e performance, pois não se encontra qualquer código-fonte no servidor, apenas um Assembly pré-compilado, que pode ser ofuscado, assinado de forma a fornecer uma maior segurança ao responsável da aplicação, de forma a que se alguém porventura ganhar acesso ao site não consiga ("de uma forma simples") alterar aquilo que a aplicação efectua. E também por ser código pré-compilado a aplicação na primeira vez que é activada é mais rápida pois não necessita de compilar todo o código.
        • Existem outras diferenças mas penso que estas são as mais importantes.
      • ASP.NET Web Site
        • Aplicações que não são pré-compiladas e que por isso mesmo têm vantagem no momento da manutenção, pois se o código sofrer alterações ou muitos add-on's será mais fácil, sendo que existem outras formas de atingir o mesmo objectivo, mas esta é sem duvida uma vantagem. Um dos problemas mais falados relativamente a este tipo de aplicações é a segurança, pois sendo o código publicado no servidor isso poderá fazer com que se alguém tiver acesso ao Site poderá ver o que a aplicação está a efectuar e até alterar o mesmo á sua escolha, e isto sem dúvida não é uma boa opção.
  2. AJAX Enabled ASP.NET Applications
    • Este tipo de aplicações apareceram qualdo as AJAX Extensions (antigamente conhecidas com Atlas) forneceram ás aplicações em ASP.NET uma framework de AJAX, sendo que esta opção é bastante utilizada no desenvolvimento de soluções ASP.NET, pois é fácil de alterar soluções já existentes e de uma forma incremental ir melhorando com a disponibilização de AJAX, utilizando Update Panels, os extenders do AJAX Control Toolkit e ao fazermos isto a nossa aplicação melhora bastante a interacção com os utilizadores tornado uma experiência rica de utilização. Mas quanto a chamar-lhes RIA's (Rich Internet Applications) muitos irão concordar e outros discordar, eu sou um dos que discorda, pois de forma a criar uma RIA necessitamos também de algo para nos ajudar a melhorar o próprio User Interface, não apenas o UX (Experiência de Utilização), se bem que o UX é bastante importante nas RIA, mas algo como o Silverlight poderá ajudar-nos bastante neste caso.
    • Este tipo de aplicações é bastante utilizado mas tem também algumas limitações, pois com a utilização do Partial Rendering poderão surgir alguns problemas, como o facto de o Histórico não ser actualizado (pode ser resolvido embora não se encontre disponível imediatamente quando instalamos o ASP.NET), a limitação do HTTP permitir apenas um pedido por cada HTTP Request, o que faz com que mesmo que tenhamos um processo a correr asincronamente poderemos ter resultados indesejados, como por exemplo se clicarmos em 2 butões, o segundo irá fazer com que o resultado do primeiro seja perdido, mesmo que tenham resultado alterações do lado do Servidor quando o mesmo foi clicado. Esta situação pode tornar-se complicada.
    • Pode ser utilizada quer com ASP.NET Web Applications ou ASP.NET Web Site
  3. ASP.NET AJAX Applications
    • Este é um tipo de aplicações que altera toda a arquitectura de como a solução ASP.NET é construída, pois tira partido de todas as vantagens da Framework de AJAX, mas para que possamos fazer isto teremos de desenvolver bastante Javascript, e bastantes alterações na forma de desenvolvimento terão de ser efectuadas de forma a que o mesmo funcione na perfeição. Com isto surgem algumas questões, como por exemplo, Vale mesmo apenas o esforço? Tem uma performance melhor? A resposta a estas questões não é própriamente trivial, e vale a pena se o problema que estamos a responder necessita mesmo de fornecer aos utilizadores uma melhor UX, e o projecto estiver a iniciar, e outras opções como o Silverlight não conseguirem dar resposta ás necessidades, e então sim vale a pena, fora disso não me parece muito interessante. Relativamente á performance, normalmente melhora a performance da solução, mas a questão será sempre a mesma. Valerá a pena o esforço?
    • Pode ser utilizada quer com ASP.NET Web Applications ou ASP.NET Web Site

   Então estes são os tipos de aplicações ASP.NET que foram apresentadas com o ASP.NET 3.5, mas com o aparecimento das ASP.NET Extensions outra forma aparece, a MVC Framework. A questão que se coloca é a seguinte, É este um novo tipo de Aplicação ASP.NET, ou uma nova opção no momento de criar uma solução em ASP.NET?

   Daquilo que vi até este momento, penso que é mais uma nova opção para a criação de aplicações em ASP.NET, pois ela é a implementação da Pattern MVC, e deverá ser utilizada de acordo com o problema que desejamos resolver necessita deste tipo de abordagem ao nível da sua arquitectura, pois fora disso poderá ser algo complexo. Por isso agora temos a possibilidade de criar aplicações ASP.NET utilizando o tipo de desenvolvimento Web Forms ou utilizando a Pattern MVC. E quando me perguntam qual a melhor abordagem a resposta é sempre a mesma. "Depende do problema", como sempre acontece na utilização de Patterns.

   Mas será que existe alguma vantagem na utilização de uma em relação á outra? A resposta é que com a ASP.NET MVC Framework é mais fácil efectuar o Unit Testing, e tendo dito isto, não estou a dizer que não se pode utilizar Unit Testing quando utilizamos os Web Forms, apenas estou a dizer que não é tão fácil.

    Seria interessante saber quais as vossas opiniões acerca deste assunto, por isso sintam-se á vontade em comentar.

(EN)

  There are several ways to develop ASP.NET, and this has been growing and it tends to continue to grow in order to chose the best approach to the problem in hand, and so I decided to write a little bit about this subject.

  So ok, with the introduction of the ASP.NET 3.5 and even with the ASP.NET 2.0 with the AJAX Extensions you had 3 choices to develop ASP.NET Applications, and those were:

  1. ASP.NET Applications
    • This was the best know type of applications without using any AJAX or anything else, just the plain simple ASP.NET Application, and this could be done using 2 types of development, that were the choices on the Visual Studio when beginning the development,
      • ASP.NET Web Application
        • Application that is pre-compiled and had some advantages in terms of security and performance, because there was no source on the server and just a pre-compiled Assembly, that could be Obfuscated, Signed, and so giving security to the owner that even if someone could gain access to the Site, there was no way ("easy") to change whatever that application was doing. An being a pre-compiled Assembly the application when activating the first time would be faster to load the first time.
        • There are more differences but I think these are the most important ones.
      • ASP.NET Web Site
        • Applications that was not pre-compiles and had advantages when maintaining the applications if the code changes a lot and there are several add-on's to it, of course there are other ways to accomplish that, but this is one. One of the mainly talked problems was the fact of the code being deployed along on the Site, and so this could make that if someone gain access to the site, it could see and change the code as it wish's, and this is not a great thing.
  2. AJAX Enabled ASP.NET Applications
    • This type of applications appeared when the AJAX Extensions (early known as Atlas) gave a AJAX Framework for the ASP.NET Applications, and this is the most used type of applications when developing ASP.NET Applications, because it's easy to change already built applications and increasingly enabling AJAX, like using Update Panels, AJAX Control Toolkit extenders and doing this our Application gained a lot more interaction with the User and also a richer user experience, as for calling it RIA's (Rich Internet Applications) some will agree and some won't, I'm with the one's who doesn't agree, because in order to make a RIA we need something to help us give a better User Interface, not only the UX (User Experience), although the UX is very important, but something like Silverlight will help us with this.
    • This type of applications is greatly used but it has some limitations, because when using Partial Rendering some problems can occur, like History not being update (this can be solved, but is not out-of-the-box), the limitation of the HTTP that only allows a single call by HTTP request, and so even if we use Asynchronous calls this can produce undesired results, like clicking 2 buttons and the second one will make that the result of the first request get lost, even if it made changes in the Server Side. This could prove to be difficult subject.
    • It can be done using ASP.NET Web Applications or ASP.NET Web Site
  3. ASP.NET AJAX Applications
    • This is a type of applications that change the Architecture of the ASP.NET Applications, because it will take full advantage of the AJAX Framework, but in order to do this, there's a lot of Javascript to be written, and a lot of changes to be made in order to work properly. And some of the questions are. Is this really worth it? Does this perform better? The answer is not trivial, and it's worth if the problem in hand really need's to give Users the best UX possible and the project is starting, and other options like Silverlight Applications doesn't solve the problem, and so in this cases is really worth it, other than that I don't think so. About the performance, normally yes, it's better than the AJAX Enabled ASP.NET Application, but the problem always reaches the "Does It Worth the effort?".
    • It can be done using ASP.NET Web Applications or ASP.NET Web Site

   So these are the types of ASP.NET Applications presented by the ASP.NET 3.5, but with the ASP.NET Extensions there's another one coming, and that's the MVC Framework. The question that can be made is, Is this really a new type of ASP.NET Application? or Is this a new option when building ASP.NET Web Applications?

   From what is seen I think it's not a new type ASP.NET Application but a new option for building ASP.NET Web Applications, because it's the implementation of the MVC Pattern, and this can be used depending of the problem in hand, and should be used only when the problem needs this type of Architectural approach, other than that in can be a little tricky. So now we have the possibility of creating ASP.NET Applications using the Web Forms type development or the MVC Pattern type development. And when asked what's the best approach my answer will always be. "Depends on the problem", has it always happens when using Patterns.

   But is there any advantage for using one or the other? My answer will be that with the ASP.NET MVC Framework the Unit Testing is a lot easier and with this said, I'll say that this doesn't mean that there's no way to use Unit testing with Web Forms, I'm only saying that it's not so easy.

   It would be great to have your thoughts about this subject, so please feel free to comment.

Virtual Earth Control for ASP.NET (PT/EN)

(PT)

    O Controlo de Virtual Earth para o ASP.NET irá ser disponibilizado em conjunto com a CTP de Julho das Windows Live Tools for Microsoft Visual Studio 2008, por isso fiquem atentos ao site dev.live.com/tools.

 

(EN)

    The Virtual Earth Control for ASP.NET will be made available with the July CTP of Windows Live Tools for Microsoft Visual Studio 2008, and so keep in touch for news on the dev.live.com/tools site.

Posted: 9-6-2008 8:26 por Nuno Filipe Godinho | with no comments
Filed under:
Silverlight 2 Beta 2 (PT/EN)

(PT)

    A Beta 2 do Silverlight 2.0 já se encontra disponível para que possamos desenvolver utilizando o Silverlight e com mais algumas novidades em termos de controlos, skins, entre outros que iremos analisar durante os próximos posts. Esta versão está disponível para ambos Windows e Mac pois continuamos e continuaremos sempre a falar de uma tecnologia Cross-Platform e Cross-Browser.

    Não devem perder este Overview relativamente ás funcionalidades disponibilizadas dentro da versão Beta 2 do Silverlight 2.0, e a comparação com o Silverlight 1.0.

    Para os developers que queiram iniciar-se as ferramentas essenciais são as seguintes:

  1. Visual Studio 2008
  2. Visual Studio 2008 Beta Tools for Silverlight 2.0 Beta 2
  3. Expression Blend 2.5 June 2008 Community Tecnology Preview
  4. Deep Zoom Composer
  5. Visite o site do Official do Silverlight

 

(EN)

    The Beta 2 of Silverlight 2.0 is already available in order for us to develop using this version of Silverlight that now as some more new stuff in terms of controls, skining, among others that we will analyze during our next posts. This version is available for both Windows and Mac because we continue and will always continue to talk about a technology that is Cross-Platform and Cross-Browser.

    You shouldn't miss this Overview that makes a relationship between the functionalities that are present on the Beta 2 of Silverlight 2.0 compared with the ones that already existed on Silverlight 1.0.

    For developers that want to stard developing the essential tools are the following:

  1. Visual Studio 2008
  2. Visual Studio 2008 Beta Tools for Silverlight 2.0 Beta 2
  3. Expression Blend 2.5 June 2008 Community Tecnology Preview
  4. Deep Zoom Composer
  5. Visit the Official Silverlight site
Biztalk Services (PT/EN)

(PT)

   No seguimento dos pensamentos relacionados com o SaaS aqui fica um artigo bastante interessante sobre Building Connected Enterprise Applications using Hosted Biztalk Services, que foi disponibilizado na MSDN Magazine de Junho de 2008.

   É bastante interessante ver a forma como Jon Flanders e Aaron Skonnard abordam este tema.

(EN)

   Following our SaaS thoughts here is a very interesting article about Building Connected Enterprise Applications using Hosted Biztalk Services, that was made available on the June 2008 MSDN Magazine.

   It's very interesting to see how Jon Flanders and Aaron Skonnard address this subject.

SaaS pela Microsoft / Microsoft's approach to SaaS (PT/EN)

(PT)

   Muito se tem falado sobre o SaaS - Software as a Service, e como afecta a forma como Pensamos/Arquitectamos/Desenvolvemos/Suportamos e até Compramos as nossas soluções, e por isso mesmo é importante conhecer a forma como um Fornecedor como a Microsoft está a aplicar esta teoria nas suas tecnologias.

   Por isso mesmo vamos pensar um pouco sobre o assunto e tentar identificar algumas ofertas dentro deste espectro.

   SaaS é quando uma aplicação é servida como se de um Serviço se trata-se.

Exemplo:

Quando adquirimos um seguro não necessitamos de adquirir também todos os outros serviços que existem para suportar a forma como a seguradora funciona, e o mesmo poderá acontecer com o Software, porque imaginem que necessitam de uma solução de CRM, será que faz sentido que para isso tenhamos de adquirir também a infraestrutura necessária para que ele funcione?

   Esta é precisamente a forma como o SaaS vê as soluções, e é por isso mesmo que são tão interessantes para ambos Fornecedores e Clientes. Para os fornecedores porque podem alargar os seus horizonten á Long Tail pois poderão fornecer o seu software baseado em SLA's (Service Level Agreement) e ao fazer isso podem aumentar as suas vendas e a utilização dos seus produtos. Para os clientes claro que tende a ser uma forma mais simplista de utilizar Software, pois não necessitam de fazer investimentos avultados quando necessitam de uma ferramenta, e podem mesmo em caso de sasonalidade do ser negócio utilizar a mesma ferramenta reduzindo os custos durante o período em que o negócio decresce. Outra coisa bastante importante para os clientes é que uma prespectiva SaaS normalmente fornece a possibilidade de "Testar antes de Comprar" e isto é importante quando estamos a avaliar a seguinte questão, "É esta a ferramenta correcta para o meu negócio?".

   Mas nem tudo é fácil e por isso mesmo quando se desenvolve soluções SaaS são necessárias grandes mudanças na forma como os fornecedores gerem todas as fases do produto, principalmente na forma como desenham ou arquitectam as suas soluções.

   Sobre a forma como a Microsoft está a abordar o SaaS existem alguns exemplos, como:

Um conjunto de ferramentas que podem ser utilizadas em desenvolvimento e também como produto final baseando-se na utilização das mesmas. Produtos como o Windows Live Id (antigo Passport), Windows Live SkyDrive, Windows Live Messenger ou mesmo o Virtual Earth são serviços de consumo disponibilizados na forma SaaS.

Um conjunto de serviços que são disponibilizados num âmbito profissional que permitem aos developers tratarem de questões como Identidade e Conectividade pois eles formam a ISB - Internet Service Bus disponibilizada pela Microsoft.

Uma Solução Application que funciona baseado na utilização reduzindo a necessidade de investimento que se encontra normalmente associado a este tipo de Ferramentas Profissionais.

   Estas são algumas das coisas que a Microsoft tem vindo a disponibilizar aos seus Clientes, e muito mais está para vir quer na prespectiva dos Clientes, quer dos Developers, e muito está também a ser feito por outros Fornecedores como a Google, Amazon e outros, por isso mesmo continuem alerta.

 

(EN)

   Much has been said about SaaS - Software as a Service, and how this will affect the way we Think/Architect/Develop/Support and even Buy our applications, and for this reason is important to stay in touch with how a vendor like Microsoft, is applying this principles to their technologies.

   So let's think a little bit about the subject and try to identify some offers in this spectrum.

   SaaS is when you have an application that is served to you the same way as a Service is.

Example:

When you buy an insurance you don't need to buy all the services that came along to make the insurance company to work, you only need to have that insurance service, and the same can happen with Software, because imagine that you need to use a CRM tool, why do you need to buy also the infrastructure for the tool to work?

   This is precisely the SaaS view of Applications, and that's why they are so interesting for vendors and customers. For vendors because they can catch the Long Tail as they can provide the Software based on SLA's (Service Level Agreement) and by doing this they can increase they sales and product usage. For customers because the tend to have a more simplistic way to use Software, because they don't need large amounts of investment when they need a Tool, and even if their business is seasonable they can use the same tool, and reduce costs during the time the business decreases. Another important thing for Customers is that SaaS normally provides the possibility to "Try before you Buy" and this is always important because the possibility to address the issue, "Is this the right tool for my business", is very important.

   But there's nothing easy in this world, and so to do SaaS it's required to do some major changes in the way vendors make all the product stages, primarily on the way applications are designed or architected.

   About Microsoft's approach to SaaS there are some samples, like:

A set of tools that can be used to in development or even only as a consumer working on usage basis. Things like Windows Live Id (Previously known as Passport), Windows Live SkyDrive, Windows Live Messenger or even Virtual Earth are the type of Consumer based SaaS that are made available for the customers.

A set of Services that are made available for professional use and allow developers to address things like Identity and Connectivity Services as they provide an ISB - Internet Service Bus.

An online CRM Application that works based on the usage and reduces the need for investment that is generally associated with this type of Professional Business Tools.

   These are some of the things Microsoft is making possible to Customers, and a lot more is coming for both Customers and Developers in this area, and a lot is being done both by Microsoft and other Vendors like Google, Amazon and so on, so keep in touch.

De Volta após longa ausência / Back after a long absence (PT/EN)

(PT)

    Estou de volta após uma ausência mais longa do que o previsto e durante esta ausência muita coisa aconteceu. A mais importante foi o facto de ter sido pai, e isso para mim foi indiscritível e fez com que ficasse algum tempo sem dormir mas estou a recuperar, agora que a minha filha vai na 2ª semana de vida. Outra situação muito interessante foi o MVP Global Summit 2008 em Seattle, foi absolutamente fantástico, ao nível técnico e de camaradagem foi muito bom. Fiquei a conhecer mais alguns dos MVP's portugueses, o que foi fantástico e mais do que isso trocar-mos experiências. Muito bom mesmo.

    Agora estou de volta ao activo, de blogar (claro), porque o resto nunca parei, e espero que continuar a ajudar-vos com as minhas dicas e artigos.

 

(EN)

   I'm back after a longer absence that was thought, and while I was absent a lot has happened. The most important thing was the fact that I became a father and that for me is indescribable and made me stay some time without any sleep, but I'm recovering, now that my daughter is on her 2nd week of life. Other situation that was very interesting was the MVP Global Summit 2008 in Seattle, it was absolutely fantastic from the technical to the personal side. I was able to meet some more Portuguese MVP's, and it was great and more than that I was able to exchange experiences with them. Very good indeed.

   Now I'm back on the active to blogging world (of course), because I never stopped the rest, and I hope I can continue to help you with my tips and articles.