Articles

Affichage des articles du 2008

WCF et les Software Factory templates

Dans leur livre, Software Factories, Jack Greenfield et Keith Short ont discuté le fait que le développement basé sur des modèles dépend de l'esquisse de de languages de modélisation à objectifs généraux en faveur des DSL (Domain Specific Language)   Un DSL modélise les concepts rencontrés dans un domaine spécifique. Les DSL doivent être utilisées en conjonction avec le framework de classes correspondant, un ensemble de classes spécifiquement conçus pour couvrir le même domaine. Donc lorsque le DSL est utilisé pour modéliser des voies spécifiques par lesquelles ces classes peuvent être utilisées, il devrait alors être possible de générer le logiciel décrit dans le modèle à partir des classes de framework   La combinaison d'un DSL et le framework de classes correspondante constitue le noyau du modèle  software factory. Les modèles de Software Factory servent à la fabrication de plusieurs variété d'un même type de logici   Un bon exemple de modèle de Software Factory

File Types supported for solution items

Category Item Type File Extension General Text file .txt Style sheet .css XML schema .xsd Bitmap file .bmp Cursor file .cur Visual C# class .cs Visual Basic class .vb HTML page .html XML file .xml XSLT file .xsl Icon file .ico Native resource template .rct Test Run Configuration Test run configuration .testrunconfig -- Alain Lompo Excelta - Conseils et services informatiques MCT MCSD For Microsoft .Net MVP Windows Systems Server / Biztalk Server Certifié ITIL et Microsoft Biztalk Server

Solution Items

Solution Items In practice, the content you will add most often to a solution is project related. But items can be added directly to a solution as well. Collectively, the term solution items refers to any nonproject file that is attached to a solution. Because we know that solutions can't be compiled, it stands to reason that files added at the solution level serve no practical purpose from a compilation perspective. There are various reasons, however, that you may want to add solution items to your solution. For instance, this is a convenient way to store documentation that applies to the solution as a whole. Because you can add any type of file to a solution, this could take the form of documents, notes to other developers, design specifications, or even source code files from other solutions that may have some impact or bearing on the work at hand. By default, Visual Studio supports a few types of solution items that can be created directly from within the IDE. They

Synchronization Datas

Image
Architecture and Classes for Client and Server Synchronization Sync Services for ADO.NET 2.0 enables synchronization between a SQL Server Compact 3.5 client database and a server database or any other data source, such as a service that provides stock quotes in XML. For synchronizing two databases, Sync Services supports two-tier and N-tier architectures that use any server database for which an ADO.NET provider is available. For synchronizing between a client database and other types of data sources, Sync Services supports a service-based architecture. This architecture requires more application code than two-tier and N-tier architectures; however, it does not require a developer to take a different approach to synchronization. The following illustrations show the components that are involved in two-tier, N-tier, and service-based architectures. Each illustration shows a single client, but there are frequently multiple clients that synchronize with a single server. Sync Servic

Powerful .Net Framework 3.5 new features I)

Time Zone Additions—There are two new types that help you work with applications that need to understand multiple time zones. These classes are System.DateTimeOffset and TimeZoneInfo. The DateTimeOffset structure represents an exact point in time. The offset indicates how the time differs from UTC (Universal Coordinated Time). You use this new class when you need precision and date/time arithmetic. The TimeZoneInfo class is a welcome enhancement that represents a date and time in a given time zone. You can use this class to reliably represent the same date and time in any other time zone. In addition, you can use the class to create custom time zones if needed. . Peer-to-Peer Networking Support—The .NET Framework finally has its own peer-to-peer networking support. This can be found in the System.Net.PeerToPeer namespace. With it, you can create an application that works without a server and instead communicates from one client (peer) to another (similar to Microsoft’s Groove applicati

DataPager control in ASP .NET 3.5

Another new control in 2008 that we’d like to highlight is the DataPager control. This control allows you to manage the paging of data and the UI associated with that paging. You can use this control by itself or embed it as part of another control you create. You can associate other, data-bound controls to a DataPager by using the DataPager’s PagedControlID property (the given control must implement the IPageableItemContainer interface). You have full control over the customization, layout, and behavior of the DataPager. Figure 1.17 shows the DataPager Fields editor (accessed from the control’s Tasks window). Notice that you can set appearance and behavior for all items associated with a given DataPager layout.

SilverLight

Microsoft’s Silverlight is another exciting client technology for the Web. Silverlight allows for an even greater user experience delivered through the browser. You use it to create media-rich, highly interactive experiences. Silverlight requires a browser add-on (or plug-in). It works with Windows, Mac, and Linux in a wide variety of browsers. Silverlight does not ship with Visual Studio 2008; however, the Silverlight extensions for Visual Studio are available as a plug-in to the tool.

Create a richer web interface

AJAX represents the capability to leverage the ubiquitous support for JavaScript in web browsers to create a more interactive user experience. Client applications built to leverage AJAX still have a client-server paradigm. However, with AJAX the client can update portions of a given page without appearing to have posted back to the server (of course, it typically does). In addition, most AJAX-enabled applications put more processing on the client for things like toggling sections of a page, working with tabs, auto-completing data entry, popping up dialogs, and more. The result is a step forward in interactivity for a user.

Enhancing the Web Developer's Productivity with Visual Studio 2008

The vast majority of applications built these days involve some semblance of a web component—be it a full-blown browser-based, web application; a smart client that works across the Web; a web service; or otherwise. In fact, the line between a traditional rich client and a web application is blurring. Technologies such as AJAX (Asynchronous JavaScript and XML), Web Services, Smart Clients, and XAML (Extensible Application Markup Language) have ensured this. You can now build rich user experiences as your needs dictate. Of course, Microsoft has remained suitably focused on expanding Visual Studio’s capabilities with respect to web development.

Programmation événementielle Acte VII)

Modèle observateur dans le Framework .NET Maintenant que nous avons certaines bases sur le modèle observateur, regardons l'utilisation de ce modèle dans le framework .NET. Pour ceux familier avec la FCL, auront sans doute remarqué que les types IObserver , IObservable , ou ObservableImpl ne sont pas présents dans le Framework. La raison première de leur absence vient du fait que la CLR les rend d'une certaine manière obsolète. Bien que vous puissiez utiliser ces constructions dans une application .NET, l'introduction des délégués (delegate) et des évènements (event), fournit un nouveau moyen très puissant pour l'implémentation du modèle Observateur sans être obligé de lui créer des types dédiés. En fait, comme les délégués et les évènements sont des classes de base de la CLR, les fondations de ce modèle se retrouvent incorporées dans le cœur du Framework .NET. La structure de la FCL en est un parfait exemple, car elle utilise le modèle observateur intensivement.

Programmation événementielle Actes VI)

Le premier argument appelé sender  permet à l'abonné de l'événement de connaître précisément l'instance de l'objet qui a émis l'événement. A quoi cela peut-il servir me direz-vous ? Et bien imaginons un instant que je possède deux instances d'un même objet, Instance1 et Instance2 , et que je souhaite m'abonner à l'événement NouveauButPourLOM . Comme dans mon cas le traitement que j'ai à faire dans cet événement côté abonné est identique pour les deux instances, je me dis que cela serait sympa de n'utiliser qu'une seule et même  méthode pour traiter les deux événements. Et bien l'argument sender m'a justement me permettre de savoir si l'événement a été émis par Instance1 ou Instance2 . A noter que si nous décidions que notre méthode CopieFichier était statique ( static ), ce premier argument n'aurait pas de sens et ne figurerait pas dans la signature. Généralement, l'événement émis par une classe à destination d