will Google make HTML5 applications viable
To briefly recap my earlier blogpost; HTML5 is causing a lot of buzz at the moment, proving itself to be a serious threat to Silverlight and Flash / Flex. When meeting with out current and potential customers, who work within the financial domain, almost all of them have aspirations to migrate their desktop and web applications to HTML5. There is no doubt that HTML5 and CSS3 bring some fantastic new features to the web, making it possible to develop the kind of complex application that previously required a plugin. However, the fundamental problem with HTML5 is JavaScript, which is not an ideal language for enterprise application development.
Google recognises this issue. An internal email from Nov 2010 that outlines their strategy for ‘Dart’, says:
“Complex web apps–the kind that Google specializes in–are struggling against the platform and working with a language that cannot be tooled and has inherent performance problems”
In the past Google has used Java to JavaScript compilation (GWT) and annotated-JavaScript to JavaScript compilation (Closure) to overcome these problems. In my previous blogpost I speculated that Microsoft could use a similar approach, offering a C# / VB.NET to JavaScript compiler, allowing HTML5 developers to use the full power of Visual Studio. However, with Dart Google are looking to go one step further:
“The goal of the Dash effort is ultimately to replace JavaScript as the lingua franca of web development on the open web platform.”
That’s quite an ambituous goal!
When should I use WPF instead of DirectX?
DirectX is definitely not dead and is still more appropriate than WPF for advanced developers writing hard-core “twitch games” or applications with complex 3D models where you need maximum performance. That said, it’s easy to write a naive DirectX application that performs far worse than a similar WPF application. DirectX is a low-level interface to the graphics hardware that exposes all of the quirks of whatever GPU a particular computer has. DirectX can be thought of as assembly language in the world of graphics: You can do anything the GPU supports. WPF provides a high-level abstraction that takes a description of your scene and figures out the best way to render it, given the hardware resources available. Internally, this might involve using Shader Model 3.0, or the fixed-function pipeline, or software. (Don’t worry if you’re not familiar with these terms, but take it as a sign that you should be using WPF!). The downside of choosing DirectX over WPF is a potentially astronomical increase in development cost. A large part of this cost is the requirement to test your application on each driver/GPU combination you intend to support. One of the major benefits of building on top of WPF is that Microsoft has already done this testing for you! You can instead focus your testing on low-end hardware for measuring performance. The fact that WPF applications can even leverage the client GPU over Remote Desktop or in a partial-trust environment is also a compelling differentiator.
What is XAML?
- It is Declarative Markup Language.
- It simplifies creating a UI for a .NET Framework application.
- It can create visible UI elements in XAML , and then separate the UI definition from the run-time logic by using code-behind files. This joined to the markup through partial class definitions. XAML represents the instantiation of objects in a special set of backing types defined in assemblies.
- It enables a workflow where separate parties can work on the UI and the logic of an application, using different tools. ex: Expression Blend and Visual Studio
- It is Visual designer to create User friendly UI
- XAML is not dependent on WPF or WPF is not dependent on XAML. WPF Designed to be XAML Friendly
What is WPF ? Why it is used?
WPF is Object Oriented , XAML based.
- It Uses DirectX Engine for rendering GUI
- It do not use GDI 32 programming at all as opposed to Win32 applications
- It do not require more time or cost for graphics, drawing or animation programming
- It is Easy to change resolution unlike win32 application
- It is XAML Friendly.
- It has .NET API that has integrated to XAML (Xtensible Application Markup Language)
- Easily select the Controls unlike Win32 Controls.
- It has the ability to create 3D graphics in windows apps
- It contains Separate API for graphics and animation
- Most powerful Windows UI Framework
It is used for the
- For the better User Interface & the Design
- Customization of Controls
- Integrating Flash, Direct, Win32, Windows Forms
- For Generic consistency professional look (Using Styles like CSS in Web)
C# interview questions and answers
- What debugging tools come with the .NET SDK? CorDBG – command-line debugger, and DbgCLR – graphic debugger. Visual Studio .NET uses the DbgCLR. To use CorDbg, you must compile the original C# file using the /debug switch.
- What does the This window show in the debugger? It points to the object that’s pointed to by this reference. Object’s instance data is shown.
- What does assert() do? In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.
- What’s the difference between the Debug class and Trace class? Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds.
- Why are there five tracing levels in System.Diagnostics.TraceSwitcher? The tracing dumps can be quite verbose and for some applications that are constantly running you run the risk of overloading the machine and the hard drive there. Five levels range from None to Verbose, allowing to fine-tune the tracing activities.
- Where is the output of TextWriterTraceListener redirected? To the Console or a text file depending on the parameter passed to the constructor.
- How do you debug an ASP.NET Web application? Attach the aspnet_wp.exe process to the DbgClr debugger.
- What are three test cases you should go through in unit testing? Positive test cases (correct data, correct output), negative test cases (broken or missing data, proper handling), exception test cases (exceptions are thrown and caught properly).
- Can you change the value of a variable while debugging a C# application? Yes, if you are debugging via Visual Studio.NET, just go to Immediate window.
- Explain the three services model (three-tier application). Presentation (UI), business (logic and underlying code) and data (from storage or other sources).
Remoting
Remoting provides a framework that allows objects to interact one another accross application domains
It is the concept of working in different application domains. In a net connected application http Protocols are stateless by default. To bring in the objects of different types and get their information as which method property is being used and getting them invoked from a remote machine is Remoting. Remoting actually works across different domains and processes and getting information about the objects used by them through the runtime environment.
Benefits of exceptions
Exceptions provide the ability to handle or clean up code in a localized place. Also, they allow clean-up code to execute in case of error. The application becomes easier to write and maintain when clean-up code is in a centralized place.
Also—and maybe more importantly—, exceptions can be used to find bugs within the code; because, the CLR walks up the stack of the thread to get the call history. With this, it is possible to find the location of the failure within the code. Further, it is possible to add additional information within the exception, so that a developer can describe the kind of error more precisely.
The biggest problem with exceptions is performance because of some information overhead. So, they should be used only where preemptive programming is inappropriate. Unfortunately, most developers tend to use exceptions improperly—i.e. catch (Exception e); which will be discussed later—or too seldom, so debugging proves harder.