Go: Create a multi-interface application (Good article)

Source: Internet
Author: User
Tags compact data structures html tags soap web services win32 wrapper visual studio
Programs | Creating applications that create multiple interfaces


Design the application ahead of time to meet the user's need for more than one interface.
by Robert Ericsson and Jason Cline
Technology involved:. NET Framework, ASP.net, Windows froms,. NET Compact framework, Mobile Internet Toolkit

Download this code (HTTP://WWW.FAWCETTE.COM/CHINA/DOTNETMAGAZINE/2002_12/CODE/NM0212RE.ZIP)
For the software your development team develops, you may want to provide the user with the best user interface, which means you need more than one interface. Users want to be able to access information at any time, at any location, on a variety of devices. This creates a need for a flexible interface and makes it even more important to design and create the fundamentals of the application and the user interface. In this article, we will describe some of the definitions, design, build, and test support. NET multiple user interface applications is the best way. Our discussion is limited to what is available and will be implemented soon. NET platform development Technology. However, if your development team has created a Java front-end system and run a server-side application through. NET Web Services, these same approaches apply.
In the article Rob Ericsson's "Choosing the right tool for a good UI" (HTTP://WWW.FAWCETTE.COM/CHINA/XMLFILE.ASPX?ID=25), he describes some of the features of the application that can help you choose to use Windows Forms or uses ASP.net to implement an application. The main point of this choice is to perform a cost-benefit analysis of each technology and consider the availability of the application as one of the most important factors. However, this is usually not a simple question of two choice. Sometimes, an application has many different user groups. So it's not surprising that users ' needs and their needs for the user interface are very different. For this type of application, the "One-size-Fits-all" (one-size-fits-all) Windows Forms or ASP.net implementations may not be appropriate.
In this case, you should consider creating an application that can provide multiple user interfaces. For this application with multiple interfaces, we can describe Microsoft Exchange server as an example: Outlook is a Windows client, and Outlook Web Access (OWA) is a web-based interface. It is ideal to use OWA when you are temporarily out of the office, and the Outlook Windows client is designed for a large number of daily work. However, different interfaces do not need to be built with different techniques. Let's look at a customer service Center application. The data entry interface used by customer service telephone operators is very different from the interface for managing applications, although they are all built with Windows Forms. In fact, using the same interface technology to create two different interfaces is much simpler than consolidating multiple interface technologies into one application.
Recognition difficulties
Although some tool vendors believe that creating an application with multiple user interfaces is simple, this is not the case. Many times, the thrill of creating a Web or PDA application makes the developer lose control over whether the Windows application is more efficient for the user. Adding an interface adds a lot of complexity to your application, so don't make such a decision easily. To help you decide whether to use multiple user interfaces for your application, you should ask yourself such a few questions.
First, do users need access to your application when they are not in the office? Support for remote users is the primary reason for providing multiple interfaces. In many cases, these users do need a separate interface to use the application. The environment that users use in a crowded airfield and in a quiet office is completely different.
Second, does your application need to run on a different platform? Because. NET does not currently provide cross-platform interoperability, so if your requirements include running applications on non-Windows operating systems, you should create an ASP.net application that allows users to access it from multiple Web browsers (see sidebar). NET is moving towards success "). If you use the Microsoft Mobile Internet Toolkit, the supported Web browsers can include browsers that run on Palm OS PDAs and mobile phones.
Finally, do you have a user base that needs to be different? It is worthwhile to consider these issues carefully before embarking on the development of the application, which can cause considerable trouble and risk to the application. Only when you are sure that your application users do need multiple interfaces can you invest to build them.
Choose your technology.
Once you decide to build an application with multiple interfaces, you need to determine which technology to use. NET provides a number of user interface options for creating an interface with multiple interfaces. NET application makes a reasonable choice, you must fully understand it. NET-related interface technology.
Windows Forms is the foundation for developing rich-client applications in. NET. Client applications have some inherent advantages over their corresponding browser-based applications. Users can use client applications without the need for network connectivity. Although the network is ubiquitous in an office environment (especially with the popularity of wireless networking technologies such as 802.11), users still need a lot of applications when they cannot take advantage of network connectivity. For example, they may need to use an application at home, in which case only a very small number of users have broadband connections, or they need to use the application in the shop floor, which is not connected to the network because of electromagnetic interference, or when traveling by air. In addition to providing offline functionality, client applications can take full advantage of the special features of Windows, while browser-based applications can only use Windows "minimum standards" functionality.
Windows forms is the "designated successor" of Microsoft Foundation Classes (MFC), which is the preferred object wrapper (object wrapper) of the Win32 API user interface Library, but MFC and windows There are many differences between forms. Strictly speaking, MFC is a C + + class pattern, and any. NET language, you can access the classes of Windows Forms. In addition, there are many improvements to the flexibility and availability of the class's schema. Because MFC is essentially a thin wrapper on Win32, it has many inconsistencies and is difficult to learn and use effectively. The schema of the Windows forms class is improved and consistent, and its learning curve resembles the learning curve of Visual Basic and has more functionality. Using Windows Forms, we can accomplish any task by writing directly to the Win32 class library. If you need an extended class to support a particular user interface for your application, you can do so by inheriting the Windows Forms class.
One of the biggest drawbacks to using MFC or Visual Basic to create a client application is that it is difficult to publish the application and all the required DLLs. Installation procedures for client applications are often complex and can be cumbersome. Smart clients of Windows forms enable us to combine the power and flexibility of rich clients with the easy release of browser-based applications as we develop applications.
Asp. NET is an important technology for creating web-based applications in. Net. In recent years, web-based applications have gone beyond the confines of a simple database access front-end system, which includes many different applications. The limitations of web-based applications for clients are very low, which is one reason why they are popular. Any machine that can access a Web server over a network can use an application that sends standard HTML to the browser. You need to consider this feature in the interface function, so that users can access an application in any Web browser, but for many applications, the inherent HTML tags provided by the basic user interface parts is enough to create a usable interface.
In addition to creating html-based applications, ASP. NET also makes it easy to create Web services based on soap (simple Object Access Protocol). It is also easy to use a Web service in a client application. Because by using. NET soap makes it easy to create client/server applications, so it's easier to provide multiple interfaces in your application. Combining Web services with rich clients can make up for the benefits of Web applications and rich clients, making up for their shortcomings.
You will have new ideas when considering the PDA user interface. While the hype over PDAs has diminished, they still represent a way for users to access community information. Gartner Dataquest predicts that 15.5 million PDAs will be produced in 2002 years. The need for a PDA interface is very different from the need for a Windows or Web application because of the smaller screen of the PDA, the limited input technology, and the typical usage environment.
Because the application designed for the PDA is very different from the development of Windows or Web applications, so. NET provides a tool to simplify this step. Visual Studio. NET's smart Device extensions allows developers to create. NET Compact Framework applications using the. NET tools, which they already know well. NET Compact Framework is. A subset of the framework that runs on resource-constrained (resource-constrained) devices such as Pocket PC PDAs, smart phones, and other running Windows CE. NET devices.
The. NET Compact Framework provides the tools necessary to create the available applications, including client access to Web services, ado.net, encryption, appropriate drawing, and form functionality. In addition to the. NET Compact framework that runs only on Pocket PC devices,. NET also features Microsoft Mobile Internet Toolkit (MIT). This asp.net extension allows developers to create Web applications on a variety of devices, including WAP-enabled handsets and most PDAs running Palm OS. It contains a set of server-side controls that provide user interface elements for lists, commands, calls, calendars, and so on. Control automatically provides the appropriate identity language (HTML, WML, CHTML) based on the access device. This allows you to focus on the development of application logic and user feedback, while MIT is responsible for the specifics of wireless development.
Implemented
. NET provides a lot of user interface technology. To help you understand how to use them, we created a sample application that has two interfaces: a Windows Forms client and a asp.net client. The sample is a time tracking and project management application that is developed for a dedicated service company to track the time spent on customer projects. The application has obvious requirements for different user groups, which can well illustrate the application of multi-user interface.
When defining the fundamental requirements of time tracking applications, we identified four different user groups: Project managers, consultant managers, consultants, and contractors. The first two users need data entry and report analysis capabilities, and the latter two users only need data input and remote access capabilities. Because of the different needs of these user groups, we split the application into two interfaces: a Windows Forms application for Administration and analysis, and a asp.net Web forms application for data entry and remote access.
It is valuable to take the time to understand the needs of the different user groups of your application, and this step is often overlooked (see the toolbar "Building availability Requirements"). Understanding the needs of the user community when you start designing your application can make your program more reusable and avoid repetitive work in product development. Because we have this understanding when designing applications, we can use ASP.net Web services and build a simple and efficient application that supports multiple user interface platforms.
One of the dangers of centralized, cross-platform business logic is to implement all the functionality that the business logic provides on all user interface platforms. The important point is that we should focus on the needs of individual interfaces and not implement them because of the functionality that can be provided by some kind of business logic. It is appropriate to understand your user base and always consider their needs.
Based on what we created. NET application experience, we have mastered some useful things in this we will share to you. One of the biggest challenges in software development is gathering and documenting requirements. The problems you are trying to solve (requirements) are often confused with the proposed solution to the problem (design). Basic use cases can help you distinguish between requirements and design (see Resources). Comparing a basic use case with a specific use case, you will find that the concrete use case illustrates the actual interaction between the user and a particular interface. When you write a specific use case, you have created (at least implicitly) the user interface. This immature interface design may cause many problems in future development cycles, especially if you use multiple interfaces in your application. If the use case specifies a specific interaction layer that relies on a particular Windows control, you must modify the requirements when the interaction media changes. This leads to the vulnerability of the requirements, which blocks the normal design process and delays development.
Carefully design business logic
In determining the requirements, we find it particularly important to carefully design the business logic layer, in addition to paying great attention to detail. Most importantly, if you are going to use Web services, you need to be aware of the limitations of the media that manage serialization and delivery of domain objects. Designing and building the right Web services is the key to this problem: the problem is solved so that you can be in. It is easier to use multiple interfaces in net. While Web services is accompanied by a lot of hype, their flexibility is unmatched in multiple interface designs.
You also need to understand the relevant technical details of the interface your application will present. For example, how does the client technology handle state? While ASP.net simplifies state processing for Web applications, this is still a concern if your application will have a Web interface. Because the Web relies on stateless HTTP protocols for communication, the burden of determining how to track a user's location in an application falls on the application developer. Tracking state in ASP.net is much easier than using previous techniques to track state, but you still need to determine how to track and use state information in your application. It is also important to consider other issues, including data structures and persistence, when designing your application. HTTP itself does not support the transfer and retention of data structures (similar to the problem of maintaining state), so you must determine how to implement them in your application. Luckily, ASP. NET's easy to use SOAP implementations can help you solve this problem.
Ignoring usability is one of the biggest mistakes you can make in a multiple-interface application. It's a good way to qualify a feature: the less the better. Loading too many functions in one interface can be confusing and difficult to use. If you follow the Bauhaus design motto-form follow function, you will get better results. Understanding what your application can provide and how users use those features is necessary to create an available application. This may mean that the interface of each platform varies greatly depending on the functionality expected by that type of user.
In the sample application, the Web and the Windows Forms interface are significantly different because we have different user groups and they use different patterns. Consultants who use the application are not interested in creating beautiful reports; they only want to record time based on the project. It may be a good idea to provide them with "extra" report analysis, but a minimal increase in complexity can result in an increase in the total cost of the application. If consultants need additional reporting capabilities, we should gather requirements and build the functionality step-by-step.
Test the most important UI first
Sometimes you may not need multiple interfaces, and you can determine this by testing the most important interface first. For example, if the primary user of an application is an internal Windows desktop user, you might think that the smart client interface is the most important. On the other hand, if the primary user is a group of mobile users, you may choose the. NET Compact Framework interface. Regardless of which interface you choose, you should first create the most important interface and test it to see if you really need to provide another interface. This gives you the opportunity to carefully focus on the application business logic and make sure it is solid. With some usability testing, you may find that the Web interface "Requirements" is not needed if you have a well-designed Windows Forms smart client application. If testing shows that you need multiple interfaces, you can collect user feedback from the first published interface, which can be used to improve the design of the future interface.
The. NET Framework provides a number of technologies that make it easy to create multiple user interfaces. However, there is no "sword" in creating an effective user interface. No matter what tools you use, there is still a fundamental problem of usability: the need to understand the user base and its users. Once you understand this, your development team needs to design a user interface that allows users to perform their tasks more effectively. Finally, the development team needs to test the user interface to make sure that it is really an effective solution.
Multiple user groups have different requirements for an application's interface, which is more and more you can use. NET tool to create the interface you need. Windows Forms provides powerful, intelligent client capabilities for Windows users, while ASP.net enables developers to create powerful Web applications; the. NET Compact Framework and MIT allow you to create flexible PDA and mobile user interfaces. Understand the tools you can use and the needs of your users. NET is key to building a successful user interface.
About the author: Robert Ericsson is a seasoned software developer and project manager who focuses on Microsoft technology research. Jason Cline is a software engineer who specializes in the. NET framework Research. You can contact them through dotnet@l10systems.com.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.