.NET Technology Guide for Business Applications

how to install .net business connector and .net technology interview questions and how to learn .net technology and advantages of net technology over java
BellaLloyd Profile Pic
BellaLloyd,France,Professional
Published Date:12-07-2017
Your Website URL(Optional)
Comment
.NET Technology Guide for Business Applications Cesar de la Torre David Carmona ProfessionalVisit us today at microsoftpressstore.com • H undreds of titles available – Books, eBooks, and online resources from industry experts • Free U.S. shipping • eB ooks in multiple formats – Read on your computer, tablet, mobile device, or e-reader • P rint & eBook Best Value Packs • eB ook Deal of the Week – Save up to 60% on featured titles • N ewsletter and special offers – Be the first to hear about new releases, specials, and more • R egister your book – Get additional benet fi s Hear about it first. Get the latest news from Microsoft Press sent to your inbox. • New and upcoming books • Special offers • Free eBooks • How-to articles Sign up today at MicrosoftPressStore.com/NewslettersWait, there’s more... Find more great content and resources in the Microsoft Press Guided Tours app. The Microsoft Press Guided Tours app provides insightful tours by Microsoft Press authors of new and evolving Microsoft technologies. • Share text, code, illustrations, videos, and links with peers and friends • Create and manage highlights and notes • View resources and download code samples • Tag resources as favorites or to read later • Watch explanatory videos • Copy complete code listings and scripts Do Dow wn nlo loa ad d f fr rom om W Wi in nd do ow ws s St Sto ore re Contents 1. Key takeaways.................................................................................................................................................................................... 4 2. Purpose of this guide ........................................................................................................................................................................ 4 WHO SHOULD USE THIS GUIDE................................................................................................................................................................................ 4 HOW TO USE THIS GUIDE ......................................................................................................................................................................................... 5 3. Overview ............................................................................................................................................................................................. 5 THE .NET FRAMEWORK AND THE FUTURE OF DEVELOPMENT ............................................................................................................................. 6 4. Emerging application patterns ........................................................................................................................................................ 9 DEVICES................................................................................................................................................................................................................... 10 Native applications for Windows devices ............................................................................................................................................ 11 Web applications for any device............................................................................................................................................................. 12 SERVICES ................................................................................................................................................................................................................. 14 CLOUD AND HYBRID-CLOUD ................................................................................................................................................................................ 16 END-TO-END SCENARIOS IN EMERGING APPLICATION PATTERNS .................................................................................................................... 19 Scenario: Connected Native Windows Store Applications ............................................................................................................ 19 Scenario: Modern Web Applications for Any Mobile Device (Tablets and Phone) ............................................................... 21 5. Established application patterns ................................................................................................................................................... 23 BUSINESS APPLICATIONS SEGMENTATION BY PRIORITIES .................................................................................................................................. 23 SMALL AND MEDIUM-SIZED BUSINESS APPLICATIONS ....................................................................................................................................... 25 Data-centric web business applications............................................................................................................................................... 27 Scenario: End-to-End Small/Medium Web Business Applications ............................................................................................. 28 Mixed approach for small/medium business web applications .................................................................................................. 29 Data-centric desktop business applications ....................................................................................................................................... 30 Scenario: Small/Medium 2-Tier Desktop Application ..................................................................................................................... 31 Scenario: Small/Medium 3-Tier Desktop Applications ................................................................................................................... 32 Modernizing desktop business applications ....................................................................................................................................... 33 Modernizing applications based on RIA containers......................................................................................................................... 34 CLOUD APP MODEL FOR OFFICE AND SHAREPOINT .......................................................................................................................................... 35 Apps for Office............................................................................................................................................................................................... 35 Scenario: Connected Apps for Office ..................................................................................................................................................... 39 Apps for SharePoint .................................................................................................................................................................................... 40 Scenario: Connected Apps for SharePoint ........................................................................................................................................... 43 LARGE, MISSION-CRITICAL BUSINESS APPLICATIONS .......................................................................................................................................... 44 .NET in large, mission-critical and core-business applications ................................................................................................... 44 Technology selection for large mission-critical and core-business applications ................................................................... 45 Scenario: Large, Core-Business Applications ...................................................................................................................................... 46 Approaches and trends for long-term core-business applications ............................................................................................. 50 Loosely coupled architecture and the dependency-inversion principle .................................................................................... 50 Architectural styles for core-business applications .......................................................................................................................... 53 Modernizing mission-critical enterprise applications ..................................................................................................................... 55 Scenarios for custom large, mission-critical applications .............................................................................................................. 55 Scenario: Domain-Driven Subsystem (Bounded Context) ............................................................................................................. 55 Scenario: CQRS Subsystem (Bounded Context) ................................................................................................................................. 60 Scenario: Communicating Different Bounded Contexts................................................................................................................. 62 .NET Technology Guide for Business Applications // 2 Scenario: Modernizing Legacy Mission-Critical Enterprise Applications .................................................................................. 63 6. Conclusions ...................................................................................................................................................................................... 65 Appendix A: Silverlight migration paths .......................................................................................................................................... 66 Appendix B: Positioning data-access technologies ........................................................................................................................ 68 .NET Technology Guide for Business Applications // 3 1. Key takeaways Select your architecture approaches and development technology based on your specific application’s priorities and requirements. A single architecture and approach won’t work for every type of application. The Microsoft development stack and .NET are extremely flexible and offer many possibilities, but it’s essential that you choose specific approaches and technologies based on the kind of application—or even subsystem—you build. Each application will have very different priorities and tradeoffs that must be taken on different paths. Business application modernization goes further than simply building mobile apps. Mobile applications must rely on and extend your foundational business applications. To be successful, mobile apps must be built with deep integration into your current foundational business applications. Mobile business apps should be part of the larger enterprise ecosystem and substantially extend foundational business applications, whether the foundational systems are established legacy applications or new, large, mission-critical applications built with innovative, scalable, and elastic services. Positioning your application or subsystem within a global patterns segmentation will help you to choose the right approaches and technologies. It is fundamental to position your application/subsystem in the right segmentation area. The right approaches and technologies for each of the following application types could potentially be very different:  Emerging application patterns – Devices and services  Established application patterns – Small and medium-sized business applications – Large, mission-critical business applications 2. Purpose of this guide This guide will help you effectively select the right Microsoft development technologies and approaches for your .NET custom application development, depending on the priorities you have for your application and for your business domain. This guidance does not cover Application Lifecycle Management (ALM) practices. For additional guidance on this topic, you can visit the Visual Studio ALM website at www.microsoft.com/visualstudio/alm. Who should use this guide This guide will be useful to decision makers, software architects, development leads, and developers who are involved in selecting the technologies to use for their applications and projects based on Microsoft development platforms. Specifically, it covers custom enterprise application development, although ISVs might also find the information and recommen- dations useful. This paper does not cover development solutions based on Microsoft business-market products, such as vertical solutions based on Dynamics CRM or Dynamics ERP. .NET Technology Guide for Business Applications // 4 How to use this guide This guide covers a broad spectrum of software development options that focus on business applications. It is written as a reference document so that you can go directly to an area you’re interested in, such as Section 4, “Emerging application patterns,” or “Large, mission-critical business applications” within Section 5, “Established application patterns.” We do recommend that you read Section 3, “Overview,” for context before you dive deeper into the individual sections. 3. Overview Today, technology use is in the midst of a shift toward multi-device experiences powered by services in the cloud. Usage patterns are increasingly dependent on local hardware capabilities such as touch, sensors, and mobility, combined with the power of web connectivity and back-end services such as data storage, media streaming, and social connectivity. The devices-services nexus spans both business and consumer scenarios. In the consumer space, mobile computing initially created a wave of devices focused on consumption, which continues to grow as hardware capabilities and technologies advance. Within the enterprise, the twin phenomena of the consumerization of IT and bring-your-own-device (BYOD) have created a dynamic in which consumer experiences are driving the future of business computing and line-of-business (LOB) applications. The next generation of device- and service-dependent applications is not emerging in isolation. These applications have to work in an extremely well-integrated fashion with existing applications, unlocking their value to new audiences and new modes of interaction. As shown in Figure 3-1, this creates two different patterns that every application developer must now face:  Established application patterns: These are applications developed using technology patterns such as client/server or web applications optimized for desktop browsers. They act as foundational applications and are heavily centered in existing business processes.  Emerging application patterns: Patterns such as multi-devices and the cloud are emerging as technology enablers for new applications. They complement the established patterns by extending the applications to be centered on the end user. Application Patterns Evolution Figure 3-1 .NET Technology Guide for Business Applications // 5 This extension of established patterns to meet the end user is a key opportunity for developers to drive new innovation and differentiation vs. competitors. Retail, communications, finances, logistics, customer services—every company is a software company in today’s business world. Each company’s ability to fulfill customer needs and compete effectively is only as good as their ability to deliver software innovation. However, extending existing applications to embrace these new needs is a challenging transformation process. Current development technologies are deeply rooted in the established pattern and are difficult to integrate with the emerging patterns needed for modern software. Existing tools do not provide an obvious path from the existing client/server world to the emerging device/cloud world. The Microsoft platform enables developers to address these challenges. It builds upon existing applications, extending them to emerging application patterns. It embraces multiple development technologies, so developers can choose the option that best fits their skills or the technologies used by their existing applications. For services development, Microsoft Windows Azure supports a multitude of technologies that any developer can use, such as Java, Node.js, PHP, Python, Ruby, and first-class support for .NET. Client development for the Microsoft platform also supports a broad range of technologies natively, such as .NET, HTML5/JavaScript, and C++. This document focuses on .NET development and specifically on business applications. It covers how to use .NET to develop for the established patterns that shape existing applications and also how to embrace the emerging patterns that are enabling the modern business applications of the future; see Figure 3-2. Modern Business Applications Figure 3-2 The .NET Framework and the future of development The Microsoft .NET Framework was built to enable developers to create compelling applications on the Microsoft platform and, by all accounts, it has been a huge success in the market. Today, millions of developers across companies of all sizes and segments rely on .NET to create applications. It provides the core services required to build consumer applications; small business applications; and large, mission-critical applications, all with unprecedented quality, performance, and productivity. .NET was also built with these now-emerging patterns in mind. At Forum 2000, Bill Gates said that the goal for .NET was “to move beyond today’s world of stand-alone websites to an Internet of interchangeable components where devices and services can be assembled into cohesive, user-driven experiences.” The original vision for .NET is remarkably well aligned with today’s developer .NET Technology Guide for Business Applications // 6 landscape, including cross-device, service-powered experiences that are changing how the industry thinks about software development. Enabling multi-device experiences empowered by services was a key attribute for .NET from the beginning. .NET has kept evolving since then, providing a first-class development experience for the new needs of applications:  On the server side, .NET provides a common platform for developers to target services that run on-premises or in the cloud. Its close integration with Windows Server and Windows Azure allows applications to be gradually extended to the cloud, taking the best of each platform and enabling hybrid applications that sit between the two worlds. The fast delivery cadence in the .NET Framework libraries also provides continuous innovation that addresses the new needs of cloud-based applications in areas such as lightweight services, real-time communications, mobile web applications, and authentication.  On the client side, .NET provides a consistent, first-class development experience across all Microsoft devices: desktop experiences, Windows Phone apps, and Windows Store apps (as shown in Figure 3-3). It allows .NET developers to keep developing foundational applications on the desktop and add exciting new experiences, all while using their existing skills and reusing code between devices. For scenarios where the reach goes beyond Microsoft devices, HTML5 browser-based solutions are the norm. .NET, in conjunction with Visual Studio, provides a modern solution for creating standard-based web applications that run across various devices. For developers looking to create more tailored, native experiences on any device, Visual Studio industry partners provide solutions that enable reusing C skills and code with non-Windows devices. .NET in the Server Is Decoupled from Client Side Figure 3-3 This document addresses all these .NET development options so that you can make the right decision for your current skills and application requirements as you move your applications forward. It is structured to address the two application patterns:  “Emerging application patterns” focuses on how to build applications using the emerging patterns that are shaping the new applications across devices and services.  “Established application patterns” covers the technologies available for creating foundational business applications, as well as recommendations on how to modernize them. Figure 3-4 shows a global diagram of Microsoft development platform technologies. The upcoming sections recommend when to use which technologies, depending on the application patterns and priorities. .NET Technology Guide for Business Applications // 7 Microsoft Development Platform Technologies Figure 3-4 .NET Technology Guide for Business Applications // 8 4. Emerging application patterns As mentioned before, emerging application patterns are shaping the applications of the future. Customers and employees now demand applications that deliver a more personal experience. They want to stay continuously connected to the services they need. This section is structured by the two main efforts that need to be addressed when developing this new breed of applications:  Creating experiences across heterogeneous devices.  Creating standard, lightweight services that extend through the cloud. The emerging application patterns are, in many ways, comparable to those of “systems of engagement” (term originally coined by Geoffrey Moore and also frequently used by Forrester, as shown in Figure 4-1), but additionally they must be supported by the cloud and must rely upon and extend actual “systems of record” (i.e., foundational business applications). “Systems of engagement” doesn’t just mean “applications targeting just consumers.” In fact, there are many new scenarios in the enterprise (such as internal apps with mobility requirements like dashboards), along with scenarios targeting end customers (such as online banking and e-commerce), where this concept is perfectly valid. Figure 4-1 Therefore, Microsoft’s vision of emerging application patterns includes the necessity of continuous and elastic services, in addition to mobile needs and direct-to-consumer connection, as shown in Figure 4-2. In most modern business applications, the client application will need a remote service in order to work with data and provide a centralized orchestration. This is where you need service orientation based on Internet standards for remote services. Finally, these Emerging Application Patterns services will be deployed in the public cloud infrastructure and services, which are the pillars for the emerging patterns in regards to deployment environments. As we drill further into the emerging application patterns, you’ll need to take into account all the possible mobile devices and social networks as a means for extending your business applications to new use cases and for building solid, continuous services that can flexibly Figure 4-2 scale to meet any demand; see Figure 4-3. .NET Technology Guide for Business Applications // 9 Devices, Social, Services, Data, and Cloud Figure 4-3 Devices The ability to deliver new experiences tailored for devices is the key attribute for the emerging application patterns. Choosing the technology to create those applications can be difficult and involves many factors, including:  Your previous skills and technology preference.  The ability to create tailored experiences that integrate with local hardware capabilities.  The diversity of devices your application will target.  The technology used by your existing applications that Scenarios for Devices and need to be migrated or extended to devices. Microsoft Technologies The two alternatives commonly established in the industry are based on very different approaches:  Native applications, which can get the most from every device but require unique skills and code for each platform.  Web applications, which can be created with a common set of skills and code but which cannot provide a tailored experience for each device. The Microsoft platform fully supports both approaches (see Figure 4-4), but it reduces the disadvantages of each significantly. First, Windows devices do not enforce a unique native development model. You can use the technology that makes the most sense for your skills and your existing applications. By bringing first-class device integration to .NET, HTML/JavaScript, and C++, you can Figure 4-4 make the decision that best fits your needs without compromising the experience. Second, .NET and Visual Studio greatly simplify creating web applications that can run across any device. ASP.NET fully embraces the modern standards and, in conjunction with the latest unique innovations in Visual Studio, enables a new breed of web applications that takes full advantage of modern browsers across devices. .NET Technology Guide for Business Applications // 10 Native applications for Windows devices Native Windows Store and Windows Phone Apps A native application is an application that runs on the client device and takes full advantage of that device’s specific features in order to provide the most compelling experience for customers. As explained before, the Windows platform extends this concept to technologies beyond C++, which greatly expands the potential to reuse your code and skills to target new form factors. Table 4-1 and Table 4-2 explain the differences between these technologies and when they are appropriate to use, depending on your application priorities and concrete context. Figure 4-5 UI development technologies for native Windows Store applications (Windows Runtime WinRT) Technologies When to use and why .NET/XAML  Appropriate if you are already familiar with .NET and XAML or when extending existing .NET/XAML applications.  It also allows you to share .NET Framework code and libraries between Windows Store apps, Windows Phone apps, Windows desktop apps, and other Microsoft platforms by using portable class libraries.  Take advantage of open source .NET libraries such as sqlite-net for local light SQL database engines, or SignalR .NET client for bi-directional communication between the client and server. JavaScript/  Appropriate if you are already familiar with HTML and JavaScript technologies or you are creating a HTML5 Windows Store tailored experience for your existing web application.  It allows you to reuse custom JavaScript or HTML/CSS assets from existing browser-based web applications and use the new WinJS library to get access to the native capabilities in the Windows Store apps/API.  Take advantage of open source JavaScript libraries such as SQLite3-WinRT for local light SQL database engines, or SignalR JavaScript client for bi-directional communication between the client and server. C++  Appropriate if you are already familiar with C++. It lets you optimize and achieve the best performance for graphics-intensive apps or games.  This option also allows you to share C++ code between Windows, Windows Phone, and other platforms, as well as target Direct3D for low-level graphics access.  Take advantage of open source C/C++ code such as SQLite. Table 4-1 References Maximize code reuse between http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj681693 Windows Phone 8 and Windows 8 Prism for Windows Runtime from http://prismwindowsruntime.codeplex.com/ Microsoft Patterns & Practices ASP.NET SignalR: Incredibly simple http://signalr.net/ real-time web for .NET SQLite: System.Data.SQLite http://system.data sqlite.org/index.html/doc/trunk/www/downloads.wiki Visual C++ and WinRT: Some http://www.codeproject.com/Articles/262151/Visual-Cplusplus-and-WinRT-Metro-Some- fundamentals fundamentals .NET Technology Guide for Business Applications // 11 UI development technologies for native Windows Phone 8 applications Technologies When to use and why .NET/XAML  Appropriate if you are already familiar with .NET and XAML or you are extending existing .NET/XAML applications.  It allows you to share .NET Framework code and libraries between Windows Phone, Windows Store, Windows desktop, and other Microsoft platforms by using portable class libraries.  Take advantage of open source .NET libraries, such as sqlite-net-wp8. C++  Appropriate if you are already familiar with C++. It lets you optimize and achieve the best performance for graphics-intensive apps or games.  This option also allows you to share C++ code between Windows Phone, Windows Store, and other platforms, as well as target Direct3D for low-level graphics access in those platforms.  Take advantage of open source C/C++ code, such as SQLite. Table 4-2 References Windows Phone 8 developer http://blogs.windows.com/windows_phone/b/wpdev/archive/2012/11/05/windows- platform highlights phone-8-developer-platform-highlights.aspx Windows Phone 8 and Windows 8 http://msdn.microsoft.com/en- app development us/library/windowsphone/develop/jj714089(v=vs.105).aspx Maximize code reuse between http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj681693 Windows Phone 8 and Windows 8 Direct3D app development for http://msdn.microsoft.com/en- Windows Phone 8 US/library/windowsphone/develop/jj207052(v=vs.105).aspx Web applications for any device Microsoft provides best-of-breed tools and technologies for creating browser-based HTML5 applications that run on any device. Because Windows also supports HTML5 as a native technology, you can target multiple devices with HTML5 web apps, then reuse and optimize that code for a native Windows Store app. The automatic switch for different HTML rendering or sizing can be achieved through different mechanisms provided by ASP.NET, JavaScript, and LightSwitch, as well as libraries such as Modernizr, which will detect the browser and adapt your HTML/JavaScript code, as shown below in Figure 4-6. .NET Technology Guide for Business Applications // 12 Modern Web Apps Figure 4-6 This approach is particularly advantageous when targeting different operating systems (such as Windows, iOS, and Android). After attaining compatibility with the most common web browsers, your application will be cross-platform compatible with the major mobile operating systems. Table 4-3 enumerates the breadth of web-development technologies available and recommends when to use each technology, depending on your application priorities and context. UI development technologies for web applications Technologies When to use and why ASP.NET MVC ASP.NET MVC with HTML5 support with HTML5  Use for flexible modern and mobile web apps, cross-browser compatibility, mobile web clients that can run support on any modern device, and to take advantage of the ASP.NET MVC mobile features (such as using different pages and rendering based on detection of the current browser user agent).  Offers a full HTML rendering control, better unit testing support, and faking capabilities.  HTML5: Use libraries like Modernizr for detecting HTML5 features support and workarounds.  Use CSS3 for less script and more maintainable code.  Use JavaScript and jQuery for client-side programming.  MVC allows Search Engine Optimizations (SEO) customizations.  RESTful URLs are an integral part of MVC. ASP.NET SPA Single Page Application (SPA) based on ASP.NET MVC, HTML5/JavaScript, Knockout, and Breeze  SPA is not a framework but a design pattern that can be implemented by using ASP.NET MVC and heavy use of JavaScript libraries like Knockout (for supporting the MVVM pattern within JavaScript) and like the Breeze JavaScript library for advanced data management and JavaScript frameworks like Durandal.  Use it for highly interactive web applications and smooth UI updates (minimum server page reload and visible round trips) and when including significant client-side interactions using HTML5, CSS3, and JavaScript.  Take advantage of the open-source SignalR JavaScript client library for bi-directional communication between the client and server.  Consume ASP.NET Web API services from JavaScript. HTML5 client for LightSwitch HTML5 client LightSwitch  Use if your web application or module is mostly data-driven (CRUD Create, Read, Update, and Delete). projects  The LightSwitch HTML5 client is the easiest way to create data-centric, cross-browser, and mobile web applications that can run on any modern device, take advantage of automatic HTML rendering, and adapt to different form factors. .NET Technology Guide for Business Applications // 13  Take advantage of CSS3, JavaScript, and OSS JavaScript libraries like jQuery Mobile and themes.  Coupled to the end-to-end LightSwitch runtime server engine which is built on top of ASP.NET. ASP.NET ASP.NET Web Pages Web Pages  ASP.NET Web Pages and the Razor syntax provide a fast, approachable, and lightweight way to combine server code with HTML to create dynamic web content. Table 4-3 References ASP.NET MVC mobile features http://www.asp.net/mvc/tutorials/mvc-4/aspnet-mvc-4-mobile-features http://www.asp.net/single-page-application ASP.NET SPA (Single Page Application) Breeze/Knockout template http://www.asp.net/single-page-application/overview/templates/breezeknockout-template Durandal SPA framework http://durandaljs.com/ http://requirejs.org/ RequireJS library BootStrap http://twitter.github.io/bootstrap Modernizr: the feature detection http://www.modernizr.com library for HTML5/CSS3 LightSwitch Architecture http://msdn.microsoft.com/en-us/vstudio/gg491708 Enhance Your LightSwitch http://blogs.msdn.com/b/bethmassi/archive/2012/03/06/enhance-your-lightswitch- Applications with OData applications-with-odata aspx HTML Client Screens for http://msdn.microsoft.com/en-us/library/vstudio/jj674623.aspx LightSwitch Apps Services The process of targeting multiple devices starts on the back end. Applications need to expose services that can be consumed on any device and scaled for the Internet. Internet services are meant to have high availability and continuity with the back-end services that allow modern applications to work. They must also be agile and have a continuous, smooth evolution, adhering to the velocity of business change. Within this context, the “.NET ecosystem” and frameworks are essential when building services. As shown in Figure 4-7, the .NET Framework supports a full range of approaches for building .NET Is Fundamental for Building Services applications: ASP.NET approaches for web development (Single-page application SPA, Model-view-controller MVC, and WebForms); ASP.NET Web API for building HTTP/REST services; and using the entity framework to access data in relational databases. Most server-side development is usually based on a .NET technology. Figure 4-7 Table 4-4 describes the technologies you can use to build services: .NET Technology Guide for Business Applications // 14 Back-end service technologies (to be consumed by native or web applications) Technologies When to use and why ASP.NET HTTP based, REST approach, resource oriented, focus on OData and JSON Web API  It is the preferred technology for flexible service development with REST approaches, OData, or JSON requirements. Try to use Web API as your first choice when evaluating which technology to use. Use any of the other technologies if Web API does not meet your needs.  Especially made for REST services. Embraces HTTP verbs (PUT, GET, POST, DELETE...) as the application drivers. Resource oriented.  High scalability thanks to Internet caches (Akamai, Windows Azure CDN, Level3, and so on) based on HTTP verbs. Windows Decouple and flexible approach Communication  Use it when you need SOAP interoperability or you want to use a non-HTTP transport. Foundation  WCF can use any protocol (such as HTTP, TCP, or named pipes), data formats (such as SOAP, binary, JSON, (WCF) or others), and hosting processes.  This technology works best for RPC-style (task/command-oriented) services and for enterprise inter- application communications. REST is possible but not preferred here.  Good fit to use with the Microsoft Service-Bus (in Windows Azure or Windows Server) and AppFabric hosting and monitoring. WCF Data Data-driven services Services  Use when your services are data/resource-oriented and mostly CRUD and data-driven.  Supports OData only. Straightforward to use but offers less flexibility and control than using ASP.NET Web API.  Shares the same OData core libraries with ASP.NET Web API. Workflow Workflow-based approach for building services Services  Use if your service logic is internally a Windows Workflow Foundation (WF) workflow. Externally, this is really a WCF service.  Workflow Services has all the benefits and characteristics of WCF and WF, but is coupled to WCF. SignalR ASP.NET SignalR library  Use for real-time functionality on the client side.  This approach enables your server-side code to push content to connected clients in real time and at high scale, even to millions of users.  It is HTTP- and WebSockets-based. It can be consumed from JavaScript in browser clients, .NET native Windows clients and server-side events, and long polling. LightSwitch OData and REST approach, resource oriented, easy way to build data-driven services OData  Use it if your client app is a LightSwitch app or for simple standalone and data-driven OData services. Services Visually model your data and LightSwitch will automatically create the services.  It is OData-based. Services consumption client libraries are the same.  Coupled to LightSwitch server engine, OData (Open Restful Data Protocol), XML, JSON, and HTTP.  Less flexible than Web API and WCF, but requires no coding. Table 4-4 References ASP.NET Web API http://www.asp.net/web-api http://msdn.microsoft.com/en-us/library/ms731082.aspx WCF WCF Data Services Tools for http://www.microsoft.com/en-us/download/details.aspx?id=30714 Windows Store Apps Creating and Consuming http://blogs.msdn.com/b/bethmassi/archive/2012/03/09/creating-and-consuming- LightSwitch OData Services lightswitch-odata-services.aspx ASP.NET SignalR http://signalr.net/ .NET Technology Guide for Business Applications // 15 Cloud and hybrid-cloud New Channels and Devices Need the Elasticity of the Cloud Modern business applications typically support many Internet users (such as end customers and partners), so maintaining your back-end services within your company’s internal datacenters may not make sense. For this reason, services are likely to be deployed in the cloud. Services also benefit from the core capabilities of the cloud, such as elasticity and a quick and cost-efficient production setup. Additionally, many modern business applications are the result of new ideas, new channels, and new opportunities. You never know if you’ll attract a significant number of new users, thus demanding Figure 4-8 more resources than what’s available in your internal datacenters. The cloud is agile and scalable, so you can develop new concepts and quickly move them to production without hardware investments or setups. Therefore, elastic platform clouds, like Windows Azure, are the best options for modern business applications. In a diverse ecosystem where business applications live in different environments (both in the cloud and on-premises), there are many new needs to meet. Because you are also extending foundational applications that are currently on-premises, you need a link between private datacenters and the cloud, and you need to link those worlds in a secure way through a hybrid-cloud approach, as shown in Figure 4-9. Modern Applications and Hybrid-Cloud Figure 4-9 The Microsoft cloud platform offers symmetrical architecture, technologies, and products to support the cloud and on-premises infrastructures—and provides common services to manage applications that span across the two infrastructures in hybrid environments. This platform enables you to migrate and build your applications easily and gradually. .NET Technology Guide for Business Applications // 16 As shown in Figure 4-10, Microsoft provides one consistent platform, whether your application is targeting the cloud or on- premises infrastructure. For development practices, it is best to use the same development platform (e.g., Visual Studio or .NET) for both cloud and on-premises environments. Similarly, having a single system to control and manage infrastructure (such as System Center) for any on-premises or cloud system is fundamental for efficient IT governance. One Consistent Platform Figure 4-10 References Microsoft Public Cloud http://www.microsoft.com/en-us/server-cloud/public-cloud/default.aspx Microsoft Advances the Cloud OS http://www.microsoft.com/en-us/news/press/2013/jan13/01-15OSMomentPR.aspx with New Management Solutions Hybrid Cloud http://www.microsoft.com/enterprise/en-nz/solutions/hybrid- cloud.aspxfbid=CmzuvecYY9J Cloud OS Vision http://www.microsoft.com/en-us/server-cloud/cloud-os/ Table 4-5 exposes the main Windows Azure technologies related to application development. Windows Azure cloud technologies Technologies When to use and why Execution Execution models for web applications and services Models Windows Azure supports multiple execution models that you can choose depending on your needs.  Infrastructure Services (Infrastructure as a Service/IaaS): Use it when you need a traditional and flexible approach, where you are responsible for the internal Virtual machine infrastructure, and software maintenance, and administration (operating system, services, etc.). It supports traditional installations of software, like full SQL Server.  Web sites (web hosting): Use it as an easy way to get started by simply deploying web applications on a managed IIS web site environment, and no infrastructure administration work is needed. It provides a low- cost, initially scalable, and broadly useful platform.  Cloud Services or Platform as a Service (PaaS): It follows the same idea of the websites, but with a much more scalable and flexible platform suited for higher quality-of-service requirements and greater control. It also handles most of the work required for reliability and administration as PaaS.  Windows Azure Mobile Services: It provides a scalable cloud back end, adding structured storage, user authentication, push notifications, and back-end jobs and services to your Windows Store, Windows Phone, Apple iOS, Android, and HTML/JavaScript applications. .NET Technology Guide for Business Applications // 17