Server Hacking - Visual Studio 2017 Features
Microsoft Visual Studio
- Microsoft Visual Studio is a development settings (IDE) from Microsoft.
- Visual Studio uses Microsoft software system development platforms such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight.
- It is used to read and edit any reasonably code, then correct, build, and publish apps for Windows, web, Android, iOS and also the cloud.
- It will produce native and managed code.
Visual Studio 2017 Features
- VS2017 has specialize in performance improvements such as
- Fast begin of VS IDE,
- Lower resolution load time, on demand Python and Xamarin extensions loading,
- Less memory consumption,
- Additional responsiveness,
- New setup experience,
Faster Visual Studio
- Visual Studio 2017 comes up with a new performance check list, once VSloader Visual Studio takes longer to load, it'll provides a list of all extensions which take time to load your editor.
- If you uncheck them and load your Visual Studio instantly.
- It will avoid opening/running some tool on editor startup.
On-demand loading extensions
- Earlier versions of Visual Studio load with all extensions and packages.
- On startup, it'll slow down its loading performance, however VS2017 has the control of 'On-demand loading extensions' within which you'll choose what you wish to load in startup.
- In this version MS has moved Python and Xamarin extensions in on-demand category, shortly they need planned to move additional packages and extensions.
- To use these options, we've to use 'Manage Visual Studio performance' sub-menu in help menu.
Shorter Solution Load Timing
- Here we can start working on our project without waiting for other project to get loaded in solution.
- This can be reached by 'Light weight solution' option from Tools -> Options -> Project and solutions
Features of .Net
- Annotations reporting
- Command window
- Deployment tools
- Editor features
- Macro recording
- Web browser
- Object browser
- Cascading Style Sheets
- It allows to extract C# annotations and extract them in HTML or store them in XML documents
- Allows to stow minimized documents along the edges of the development environment and pops up documents as mouse-over them
- It allows to invoke commands within the IDE
- It permits to take advantage of Windows Installer to deploy applications, supports installation rollback and app advertising, graphical editor allows to create installers; merge modules allow to standardize component installation for multiple apps
- This feature includes auto-indent, color highlighting, auto-complete, clipboard rings, document navigation, and etc.,
- It allows to record and play macros directly in the development environment
- It allows to display Web pages directly in the development environment
- It allows to edit XML with syntax-directed highlighting
- Object browser supports all languages and allows to browse objects in projects, class libraries.
Cascading Style Sheets
- It is used for creating styles that can be applied to HTML or XML elements
What is .Net Framework ?
- To provide a consistent object-oriented programming environment whether object codes is stored and executed locally on Internet-distributed, or executed remotely.
- To provide a code-execution environment to minimizes software deployment and guarantees safe execution of code.
- Eliminates the performance problems.
- There are different types of application, such as Windows-based applications and Web-based applications.
- To make communication on distributed environment to ensure that code be accessed by the .NET Framework can integrate with any other code.
Components of .Net Framework
Common Language Runtime (CLR):
- The common language runtime is the foundation of the .NET Framework.
- It manages code at execution time, providing important services such as memory management, thread management, and remoting and also ensures more security and robustness.
- The concept of code management is a fundamental principle of the runtime.
- Code that targets the runtime is known as managed code, while code that does not target the runtime is known as unmanaged code.
.Net Framework Class Library:
- It is a comprehensive, object-oriented collection of reusable types used to develop applications ranging from traditional command-line or graphical user interface (GUI) applications to applications based on the latest innovations provided by ASP.NET, such as Web Forms and XML Web services.
- The .NET Framework can be hosted by unmanaged components that load the common language runtime into their processes and initiate the execution of managed code, thereby creating a software environment that can exploit both managed and unmanaged features.
- The .NET Framework not only provides several runtime hosts, but also supports the development of third-party runtime hosts.
- Internet Explorer is an example of an unmanaged application that hosts the runtime (in the form of a MIME type extension).
- Using Internet Explorer to host the runtime to enables embeds managed components or Windows Forms controls in HTML documents.
Features of the Common Language Runtime:
The common language runtime manages memory; thread execution, code execution, code safety verification, compilation, and other system services these are all run on CLR.
- The runtime enforces code access security. The security features of the runtime thus enable legitimate Internet-deployed software to be exceptionally feature rich.
- With regards to security, managed components are awarded varying degrees of trust, depending on a number of factors that include their origin to perform file-access operations, registry-access operations, or other sensitive functions.
- The runtime also enforces code robustness by implementing a strict type- and code-verification infrastructure called the common type system(CTS).
- The CTS ensures that all managed code is self-describing.
- The managed environment of the runtime eliminates many common software issues.
- The runtime also accelerates developer productivity.
- For example, programmers can write applications in their development language of choice, yet take full advantage of the runtime, the class library, and components written in other languages by other developers.
- The runtime is designed to enhance performance. Although the common language runtime provides many standard runtime services, managed code is never interpreted.
- A feature called just-in-time (JIT) compiling enables all managed code to run in the native machine language of the system on which it is executing.
- Finally, the runtime can be hosted by high-performance, server-side applications, such as Microsoft® SQL Server™ and Internet Information Services (IIS).
- ASP.NET is the next version of Active Server Pages (ASP); it is a unified Web development platform that provides the services necessary for developers to build enterprise-class Web applications.
- While ASP.NET is largely syntax compatible, it also provides a new programming model and infrastructure for more secure, scalable, and stable applications.
- ASP.NET is a compiled, NET-based environment, we can author applications in any .NET compatible language, including Visual Basic .NET, C#, and JScript .NET. Additionally, the entire .NET Framework is available to any ASP.NET application.
- Developers can easily access the benefits of these technologies, which include the managed common language runtime environment (CLR), type safety, inheritance, and so on.
- ASP.NET has been designed to work seamlessly with WYSIWYG HTML editors and other programming tools, including Microsoft Visual Studio .NET.
- Not only does this make Web development easier, but it also provides all the benefits that these tools have to offer, including a GUI that developers can use to drop server controls onto a Web page and fully integrated debugging support.
- Developers can choose from the following two features when creating an ASP.NET application. Web Forms and Web services, or combine these in any way they see fit.
- Each is supported by the same infrastructure that allows you to use authentication schemes; cache frequently used data, or customizes your application's configuration, to name only a few possibilities.
- Web Forms allows us to build powerful forms-based Web pages. When building these pages, we can use ASP.NET server controls to create common UI elements, and program them for common tasks.
- These controls allow we to rapidly build a Web Form out of reusable built-in or custom components, simplifying the code of a page.
- An XML Web service provides the means to access server functionality remotely. Using Web services, businesses can expose programmatic interfaces to their data or business logic, which in turn can be obtained and manipulated by client and server applications.
- XML Web services enable the exchange of data in client-server or server-server scenarios, using standards like HTTP and XML messaging to move data across firewalls.
- XML Web services are not tied to a particular component technology or object-calling convention.
- As a result, programs written in any language, using any component model, and running on any operating system can access XML Web services
- Each of these models can take full advantage of all ASP.NET features, as well as the power of the .NET Framework and .NET Framework common language runtime.
- Accessing databases from ASP.NET applications is an often-used technique for displaying data to Web site visitors.
- ASP.NET makes it easier than ever to access databases for this purpose. It also allows us to manage the database from your code.
- ASP.NET provides a simple model that enables Web developers to write logic that runs at the application level. Developers can write this code in the global.aspx text file or in a compiled class deployed as an assembly.
- This logic can include application-level events, but developers can easily extend this model to suit the needs of their Web application.
- ASP.NET provides easy-to-use application and session-state facilities that are familiar to ASP developers and are readily compatible with all other .NET Framework APIs.
- ASP.NET offers the IHttpHandler and IHttpModule interfaces. Implementing the IHttpHandler interface gives you a means of interacting with the low-level request and response services of the IIS Web server and provides functionality much like ISAPI extensions, but with a simpler programming model.
- Implementing the IHttpModule interface allows you to include custom events that participate in every request made to your application.
- ASP.NET takes advantage of performance enhancements found in the .NET Framework and common language runtime.
- Additionally, it has been designed to offer significant performance improvements over ASP and other Web development platforms.
- All ASP.NET code is compiled, rather than interpreted, which allows early binding, strong typing, and just-in-time (JIT) compilation to native code, to name only a few of its benefits.
- ASP.NET is also easily factorable, meaning that developers can remove modules (a session module, for instance) that are not relevant to the application they are developing.
- ASP.NET provides extensive caching services (both built-in services and caching APIs).
- ASP.NET also ships with performance counters that developers and system administrators can monitor to test new applications and gather metrics on existing applications.
- Writing custom debug statements to your Web page can help immensely in troubleshooting your application's code.
- However, it can cause embarrassment if it is not removed. The problem is that removing the debug statements from your pages when your application is ready to be ported to a production server can require significant effort.
- ASP.NET offers the Trace Context class, which allows us to write custom debug statements to our pages as we develop them.
- They appear only when you have enabled tracing for a page or entire application.
- Enabling tracing also appends details about a request to the page, or, if you so specify, to a custom trace viewer that is stored in the root directory of your application.
- The .NET Framework and ASP.NET provide default authorization and authentication schemes for Web applications.
- we can easily remove, add to, or replace these schemes, depending upon the needs of our application .
- ASP.NET configuration settings are stored in XML-based files, which are human readable and writable.
- Each of our applications can have a distinct configuration file and we can extend the configuration scheme to suit our requirements.
Data Access with ADO.NET
- As you develop applications using ADO.NET, you will have different requirements for working with data.
- You might never need to directly edit an XML file containing data - but it is very useful to understand the data architecture in ADO.NET.
ADO.NET offers several advantages over previous versions of ADO:
- ADO.NET applications can take advantage of the flexibility and broad acceptance of XML.
- Because XML is the format for transmitting datasets across the network, any component that can read the XML format can process data.
- The receiving component need not be an ADO.NET component.
- The transmitting component can simply transmit the dataset to its destination without regard to how the receiving component is implemented.
- The destination component might be a Visual Studio application or any other application implemented with any tool whatsoever.
- The only requirement is that the receiving component be able to read XML.
- SO, XML was designed with exactly this kind of interoperability in mind.
- In the life of a deployed system, modest changes are possible, but substantial, Architectural changes are rarely attempted because they are so difficult.
- As the performance load on a deployed application server grows, system resources can become scarce and response time or throughput can suffer.
- Faced with this problem, software architects can choose to divide the server's business-logic processing and user-interface processing onto separate tiers on separate machines.
- In effect, the application server tier is replaced with two tiers, alleviating the shortage of system resources.
- If the original application is implemented in ADO.NET using datasets, this transformation is made easier.
- ADO.NET data components in Visual Studio encapsulate data access functionality in various ways that help you program more quickly and with fewer mistakes.
- ADO.NET datasets offer performance advantages over ADO disconnected record sets. In ADO.NET data-type conversion is not necessary.
- ADO.NET accommodates scalability by encouraging programmers to conserve limited resources.
- Any ADO.NET application employs disconnected access to data; it does not retain database locks or active database connections for long durations.
Visual Studio .NET
- Visual Studio .NET is a complete set of development tools for building ASP Web applications, XML Web services, desktop applications, and mobile applications.
- In addition to building high-performing desktop applications, you can use Visual Studio's powerful component-based development tools and other technologies to simplify team-based design, development, and deployment of Enterprise solutions.
- Visual Basic .NET, Visual C++ .NET, and Visual C# .NET all use the same integrated development environment (IDE), which allows them to share tools and facilitates in the creation of mixed-language solutions.
- In addition, these languages leverage the functionality of the .NET Framework and simplify the development of ASP Web applications and XML Web services.
- Visual Studio supports the .NET Framework, which provides a common language runtime and unified programming classes; ASP.NET uses these components to create ASP Web applications and XML Web services.
- Also it includes MSDN Library, which contains all the documentation for these development tools.
XML Web Services:
- XML Web services are applications that can receive the requested data using XML over HTTP.
- XML Web services are not tied to a particular component technology or object-calling convention but it can be accessed by any language, component model, or operating system.
- In Visual Studio .NET, you can quickly create and include XML Web services using Visual Basic, Visual C#, JScript, Managed Extensions for C++, or ATL Server.
- Extensible Markup Language (XML) provides a method for describing structured data. XML is a subset of SGML that is optimized for delivery over the Web.
- The World Wide Web Consortium (W3C) defines XML standards so that structured data will be uniform and independent of applications.
- Visual Studio .NET fully supports XML, providing the XML Designer to make it easier to edit XML and create XML schemas.
Visual Basic .NET
- Visual Basic.NET, the latest version of visual basic, includes many new features.
- The Visual Basic supports interfaces but not implementation inheritance.
- Visual basic.net supports implementation inheritance, interfaces and overloading.
- In addition, Visual Basic .NET supports multithreading concept.
Common Language Specification (CLS):
- Visual Basic.NET is also compliant with CLS (Common Language Specification) and supports structured exception handling.
- CLS is set of rules and constructs that are supported by the CLR (Common Language Runtime).
- CLR is the runtime environment provided by the .NET Framework; it manages the execution of the code and also makes the development process easier by providing services.
- Visual Basic.NET is a CLS-compliant language. Any objects, classes, or components that created in Visual Basic.NET can be used in any other CLS-compliant language.
- In addition, we can use objects, classes, and components created in other CLS-compliant languages in Visual Basic.NET .
- The use of CLS ensures complete interoperability among applications, regardless of the languages used to create the application.
- Visual Basic.NET supports implementation inheritance.
- This means that, while creating applications in Visual Basic.NET, we can drive from another class, which is know as the base class that derived class inherits all the methods and properties of the base class.
- In the derived class, we can either use the existing code of the base class or override the existing code.
- Therefore, with help of the implementation inheritance, code can be reused.
Constructors and Destructors:
- Constructors are used to initialize objects, whereas destructors are used to destroy them.
- In other words, destructors are used to release the resources allocated to the object.
- In Visual Basic.NET the sub finalize procedure is available.
- The sub finalize procedure is used to complete the tasks that must be performed when an object is destroyed.
- The sub finalize procedure is called automatically when an object is destroyed.
- In addition, the sub finalize procedure can be called only from the class it belongs to or from derived classes.
- Garbage Collection is another new feature in Visual Basic.NET.
- The .NET Framework monitors allocated resources, such as objects and variables.
- In addition, the .NET Framework automatically releases memory for reuse by destroying objects that are no longer in use.
- In Visual Basic.NET, the garbage collector checks for the objects that are not currently in use by applications.
- When the garbage collector comes across an object that is marked for garbage collection, it releases the memory occupied by the object.
- Overloading is another feature in Visual Basic.NET.
- Overloading enables us to define multiple procedures with the same name, where each procedure has a different set of arguments.
- Besides using overloading for procedures, we can use it for constructors and properties in a class.
- Visual Basic.NET also supports multithreading.
- An application that supports multithreading can handle multiple tasks simultaneously, we can use multithreading to decrease the time taken by an application to respond to user interaction.
- To decrease the time taken by an application to respond to user interaction, we must ensure that a separate thread in the application handles user interaction.
Structured Exception Handling:
- Visual Basic.NET supports structured handling, which enables us to detect and remove errors at runtime.
- In Visual Basic.NET, we need to use Try…Catch…Finally statements to create exception handlers. Using Try…Catch…Finally statements, we can create robust and effective exception handlers to improve the performance of our application.