- software deployed as a hosted service and accessed over the Internet
- E-Mail is the best example for SaaS (GMail, Yahoo...)
Software as a Service (or SaaS)
SOA or Service-Oriented Architecture
- Service-Oriented Architecture (SOA) is a set of principles and methodologies for designing and developing software in the form of interoperable services.
- These services are well-defined business functionalities that are built as software components that can be reused for different purposes.
- XML is commonly used for interfacing with SOA services
- SOA enables the development of applications that are built by combining loosely coupled and interoperable services
Class member visibility notations in UML
To specify the visibility of a class member (i.e., any attribute or method) there are the following notations that must be placed before the member's name
- + : Public
- - : Private
- # : Protected
- ___ : Static
- / : Derived
- ~ : Package
Agile Scrum
Scrum is a process skeleton that contains sets of practices and predefined roles. The main roles in Scrum are
- the “ScrumMaster”, who maintains the processes (project manager)
- the “Product Owner”, is responsible for communicating the vision of the product to the development team.
- the “Team”, a cross-functional group who do the actual analysis, design, implementation, testing, etc.
- A product owner creates a prioritized wish list called a product backlog.
- During sprint planning, the team pulls a small chunk from the top of that wishlist, a sprint backlog, and decides how to implement those pieces.
- The team has a certain amount of time, a sprint, to complete its work - usually two to four weeks - but meets each day to assess its progress (daily scrum).
- Along the way, the ScrumMaster keeps the team focused on its goal.
What is scriptresource.axd?
- It's HTTPHandler file
- ScriptResource.AXD contains all of the clientside javascript routines for Ajax.
- Automatically GZip/Compressing your scripts.
- Dynamically resolving Release/Debug scripts based on build parameters. This is useful, if you keep two types of the same script: one for debug, and one packed for release.
- Can be used for Non-MsAJAX Framework script assets such as jQuery.
What is WebResource.axd?
- WebResource.axd is an HTTP Handler, part of the .NET Framework
- The main task is getting an embedded resource out of a DLL and returning its content
- Right click the file in the project
- set the file's Build Action to "Embedded Resource"
- Page.ClientScript.GetWebResourceUrl(this.GetType(), "filename.js")
- Using the above code you can register it in the client script (Page.ClientScript.RegisterClientScriptInclude)
- <script src="/TestWebsite/WebResource.axd?d=xlz&t=987" type="text/javascript">
Waterfall model
- The waterfall model is a sequential design process
- It is likely flowing steadily downwards (like a waterfall)
- Various phases are Conception, Initiation, Analysis, Design, Construction, Testing, Production/Implementation and Maintenance.
What is Sprint
- A sprint is a basic unit of development in the agile development methodologies.
- Sprints tend to last between one week and one month
- Each sprint is preceded by a planning meeting, where the tasks for the sprint are identified and an estimated commitment for the sprint goal is made, and followed by a review or retrospective meeting where the progress is reviewed and lessons for the next sprint are identified.
ASP.NET MVC Framework
MVC is a framework methodology that divides an application's implementation into three component roles: models, views, and controllers
Release history
- Models in a MVC based application are the components of the application that are responsible for maintaining state.
- Views in a MVC based application are the components responsible for displaying the application's user interface. Typically this UI is created off of the model data
- Controllers in a MVC based application are the components responsible for handling end user interaction, manipulating the model, and ultimately choosing a view to render to display UI. In a MVC application the view is only about displaying information - it is the controller that handles and responds to user input and interaction
MVC view engine: MVC having 8 alternate view engines,Brail, NDjango, NHaml, NVelocity, SharpTiles, Spark,
StringTemplate and XSLT.
Razor is a view-engine developed by Microsoft and released with MVC 3 that is optimized around HTML generation using a code-focused templating approach.
| Date | Version |
|---|---|
| 10 December 2007 | ASP.NET MVC CTP |
| 13 March 2009 | ASP.NET MVC 1.0 |
| 10 March 2010 | ASP.NET MVC 2.0 |
| 13 January 2011 | ASP.NET MVC 3.0 |
How to access unmanaged code using Interop
- Use System.Runtime.InteropServices
- Use DllImport to declare the unmanaged procedure
- Map the data types of the procedures parameters to equivalent .NET types
- Call the unmanaged procedure
- Test it
What is Code-Access security
Code access security is a mechanism that helps limit the access to the code by protecting the resources. It defines permissions which tell about the rights to access various. It also imposes restrictions on code at run time.
Passport authentication in .NET
ASP.NET directs the user to a Passport sign-on page. The Passport service authenticates the user, stores an authentication cookie on the user’s computer and direct the user to the requested page.
Next time it'll checks the user’s machine for a passport authentication cookie. If it is not available, redirect to Passport sign-on page.
- Install the Passport SDK.
- Set the application’s authentication mode to Passport in Web.config.
- Set authorization to deny unauthenticated users.
- Use the PassportAuthentication_OnAuthenticate event to access the user’s Passport profile to identify and authorize the user.
- Implement a sign-out procedure to remove Passport cookies from the user’s machine
ACID properties of the database
All Database systems which include transaction support implement ACID properties to ensure the integrity of the database. ACID stands for Atomicity, Consistency, Isolation and Durability
- Atomicity: Each transaction is said to be “atomic.” If one part of the transaction fails, the entire transaction fails. Modifications on the data in the database either fail or succeed.
- Consistency: This property ensures that only valid data will be written to the database. If, for some reason, a transaction is executed that violates the database’s consistency rules, the entire transaction will be rolled back and the database will be restored to a state consistent with those rules.
- Isolation: It requires that multiple transactions occurring at the same time not impact each other’s execution.
- Durability: It ensures that any transaction committed to the database will not be lost.
Difference between classes and structs
| Class | Struct |
| Reference Type | Value Type |
| Memory will be allocated in heap | In Stack |
| Support Inheritance | Not supported |
| Assign null values to class variable | Not possible |
| Can have destructor | Not possible |
Specifying a Rendering Format in a URL
http://servername/server?/Sales/Summary&rs:Format=HTML4.0&rs:Command=Render
http://servername/server?/Sales/Summary&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=false&Year=2002
| Prefix | Action |
|---|---|
| rc | Supplies a rendering extension with specific device information settings. |
| rs | Targets the report server with specific parameters. |
| rv | Passes report parameters in a URL to a report that is stored in a SharePoint document library, for the Report Viewer Web Part. |
| dsp | Specifies a password with which to access a data source. |
Format types:
HTML3.2, HTML4.0, MHTML, IMAGE, EXCEL, WORD, CSV, PDF, XML, and NULL
More Info
Different types of data sources in SSRS?
SSRS use different data source. Some of them are listed below.
For More info http://msdn.microsoft.com/en-us/library/ms156450.aspx
- Microsoft SQL Server
- Microsoft SQL Azure
- Microsoft SharePoint List
- SQL Server Analysis Service
- Microsoft SQL Server Parallel Data Warehouse
- OLEDB
- Oracle
- ODBC
- Report Server Model
- SAP Netweaver BI
- Hyperion Essbase
- Teradata
- XML
For More info http://msdn.microsoft.com/en-us/library/ms156450.aspx
Web service used for reporting services
Reporting Service Web Service used in SSRS. By accessing this web service you can access all report server component and also get the report deployed on report server
What is the name of reporting services config file and what’s it’s used for?
Reporting service config file is used for report configuration details. It contains the report format and also the report import types. Report service config reside at ISS
How to deploy the Report?
Report can be deployed in three ways.
- Visual studio IDE
- report server
- Creating the utility : Rs.exe utility is used for deploying the report on report server.
What is report subscription?
Report subscription is to schedule
the resource on particular time and to send a mailer to particular
users.
Why can’t we use page total in the report body?
These built in field can be added in footer or header for better representation of the
report. It can not be used in the body.
What is ADHOC Report/Report model project in SSRS?
Adhoc Reports are the reports which end user can create using report model project(Report builder). These reports have a predefined layout which is a standard layout from Microsoft. User can select columns from different table or views and can generates the request as per his or her requirement.
What are the different types of report?
Reporting Services, you can create the following types of reports.
- Parameterized reportsParameter/Input values are used to generate the report. Parameterized reports are frequently used for drillthrough reports, linked reports, and subreports, connecting and filtering reports with related data. Reporting Services supports two kinds of parameters:
- Query parameters : Query parameters are used during data processing to select or filter data.
- Report parameters : Report parameters are used during report processing to show a different aspect of the data.
- Linked reports
A linked report is a report server item that provides an access point to an existing report. Conceptually, it is similar to a program shortcut that you use to run a program or open a file.A linked report is derived from an existing report and retains the original's report definition. A linked report always inherits report layout and data source properties of the original report. All other properties and settings can be different from those of the original report, including security, parameters, location, subscriptions, and schedules - Snapshot reports When you select a report snapshot for viewing, the report server retrieves the stored report from the report server database and shows the data and layout that were current for the report at the time the snapshot was created.
- Cached reports
A cached report is a saved copy of a processed report. - Ad hoc reports
- Clickthrough reports
A clickthrough report is a report that provides detailed information about the data contained within the main report.
Clickthrough reports are available only when running SQL Server Enterprise.By default, the report server generates two clickthrough template types for each entity: a single instance template and a multiple instance template. The item that you click on determines which template is used. If the person reading the report clicks a scalar attribute, the single instance template is used. If the person reading the report clicks an aggregate attribute, the multiple instance template is used. - Drilldown reports
Drill down reports are the reports which can collapse or expand as per requirement i.e. information can be drilled down in to minor level information if required. - Drillthrough reports
- Subreports
Sub reports are the reports which can be called in main report and can be generate through main report. Parameters can be passed from main report to sub report and basis of that report can be generated.
- TSQL Reports:
TSQL Reports are made up of plain SQL Query. Data source in this case is SQL server database engine. - MDX Reports:
MDX reports are created through cubes. For this data source is analysis services cubes.
How to access SSRS report from program
objRPT.ShowParameterPrompts = false;
objRPT.ShowCredentialPrompts = false;
objRPT.ProcessingMode = ProcessingMode.Remote;
objRPT.ServerReport.ReportServerUrl = new Uri("http://xxxx/ReportServer");
IReportServerCredentials iRPTcre = new CustomReportCredentials("username","password","domain");
objRPT.ServerReport.ReportServerCredentials = iRPTcre;
objRPT.ServerReport.ReportPath = "/folder/reportname";
ReportParameter[] rptParams = new ReportParameter[1];
rptParams[0] = new ReportParameter("SalesOrderNumber", "SO50750");
AJAX Post & Get Syntax
- GET method
xmlhttp.open("GET","demo_get2.asp?fname=Henry&lname=Ford",true); xmlhttp.send(); - POST method
xmlhttp.open("POST","ajax_test.asp",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("fname=Henry&lname=Ford"); -
Status
Property Description onreadystatechange Stores a function (or the name of a function) to be called automatically each time the readyState property changes readyState Holds the status of the XMLHttpRequest. Changes from 0 to 4:
0: request not initialized
1: server connection established
2: request received
3: processing request
4: request finished and response is readystatus 200: "OK"
404: Page not found
- Example
<script type="text/javascript"> function loadXMLDoc() { var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("myDiv").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","ajax_info.txt",true); xmlhttp.send(); } </script>
jQuery Name Conflicts
jQuery uses the $ sign as a shortcut for jQuery.
Some other JavaScript libraries also use the dollar sign for their functions.
The jQuery noConflict() method specifies a custom name (like jq), instead of using the dollar sign.
Some other JavaScript libraries also use the dollar sign for their functions.
The jQuery noConflict() method specifies a custom name (like jq), instead of using the dollar sign.
<script type="text/javascript">
var jq=jQuery.noConflict();
jq("p").hide();
<script>
Caching & Different Ways to cach
Caching is the technique of storing frequently used items in memory so that they can be accessed more quickly. By caching the response, the request is served from the response already stored in memory. It is a technique of temporary storage of page or data on ClientSide or DownStream or Server Side.
- Output cache - Full page caching
- Fragment caching - Particular user control
- Datacaching - Small piece of data.
- Key
- Time
- File
- SQL Cache
- Any
- None
- Client
- Downstream
- Server
- ServerAndClient
AutoEventWireup
- AutoEventWireup attribute is used to set whether the events needs to be automatically generated or not.
- The AutoWireup attribute is either set as True or False. The attribute allows you to fire the events written in code behind file.
- If this page level attribute is set to False then the code behid Events will not fire automatically. For E.g if there is Event for the Page load (Page_load) on code behind file and attribute is set to false then this event will not fire if page loads up in browser.
Maximum number of cookies per site
- Internet Explorer 6 - 20 cookies
- Internet Explorer 8 - 50 cookies
- Opera 8.01 30 cookies
- Firefox 1.0.6 50 cookies
Event Bubbling
Event Bubbling is nothing but events raised by child controls is handled by the parent control.
Server controls like Datagrid, DataList, Repeater can have other child controls insidethem. Example DataGrid can have combo box inside datagrid. These child control do notraise there events by themselves, rather they pass the event to the container parent (whichcan be a datagrid, datalist, repeater), which passed to the page as “ItemCommand” event.As the child control send there events to parent this is termed as event bubbling
ASP.NET Page Life
- Pre-Init
- Init
- Init Completed
- Pre-Load
- Load
- Load Complete
- Pre-Render
- Pre-Render Complete
- Save State Complete
HTTP Modules and HTTP Handlers
HTTP modules and HTTP handlers are an integral part of the ASP.NET architecture. While a request is being processed, each request is processed by multiple HTTP modules (for example, the authentication module and the session module) and is then processed by a single HTTP handler. After the handler has processed the request, the request flows back through the HTTP modules.
- HTTP Handlers
- HTTP Handlers can be used to process custom requests that may not be in the standard supported format like .htm, .aspx, .asmx etc.
- One example will be RSS feed processing .
- The primary job of an Http handler is to produce a http response (not html)
- How to configure HTTP handlers
- HTTP Module
- Modules are called before and after the handler executes.
- Modules enable developers to intercept, participate in, or modify each individual request.
- Modules implement the IHttpModule interface, which is located in the System.Web namespace.
- How to configure HTTP Modules
SqlCommand and SqlCommandBuilder
- SQLCommand is used to execute all kind of SQL queries like DML(Insert, update,Delete) & DDL like(Create table, drop table etc)
- SQLCommandBuilder object is used to build & execute SQL (DML) queries like select, insert, update & delete.
ASP.NET Required Access Control Lists
The following table shows which type of file and folder permissions the identity of an ASP.NET Web application must have in order to function properly:
More info http://msdn.microsoft.com/en-us/library/kwzs111e.aspx
| %SystemRoot%\Microsoft.NET\Framework\xxx\Temporary ASP.NET Files | Read/write |
| %SystemRoot%\assembly | Read |
| %SystemRoot%\System32 | Read |
| %SystemRoot%\Temp | Read/write/delete |
| User profile directory | Read/write |
| %SystemRoot%\Microsoft.NET\Framework\xxx and subdirectories | Read |
More info http://msdn.microsoft.com/en-us/library/kwzs111e.aspx
Web-Garden and Web-Farm
- Web garden
- A Web garden is configured on a single server using multiple processors.
- Web garden is configured throw the process model element in the machine.config.
- The cpuMask attributes is used to specifies which processors are eligible to run ASP.NET processes.
- The cpuMask value specifies a bit pattern that indicates the CPUs eligible to run ASP.NET threads. For example, the cpuMask hexadecimal value 0x0d represents the bit pattern 1101. On a computer with four CPUs, this indicates that ASP.NET processes can be scheduled on CPUs 0, 2, and 3, but not on CPU 1. ASP.NET launches one worker process for each eligible CPU.
- Web gardens enable the use of multiple processes, each process will have its own copy of application state, in-process session state, caches, and static data.
- Web gardens should not be used for all applications, especially if they need to maintain state.
- Web farm
Web farms use multiple servers for a Web site.
MVC Application on IIS 5.1
- Open IIS (Inetmgr from run)
- Right click on your Web Site and click Properties
- Set permissions to Scripts Only
- Click Configuration. Under the Mappings tab, click the Add button
- You need to insert the path to the file aspnet_isapi.dll. This is most likely C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll.
- In the Extension field, enter “.*” (excluding quotes).
- Select All Verbs. Select “Script Engine”.
- Make sure ”Check that file exists” is not selected.
Advantages of a layered architecture
Advantages
- Enables develop loosely coupled systems
- Application can be independently deployed, maintained, and updated, on different time schedules
- Helps you to test the components independently
- Multiple applications can reuse the components
- Extra overhead of passing through layers instead of calling a component directly
- Separating codes leads to complexity to simple applications
Difference between login controls and Forms authentication
- The FormsAuthentication class is used in the background for the authentication ticket and ASP.NET membership is used to validate the user credentials.
- Forms authentication can be easily implemented using login controls without writing any code. Login control performs functions like prompting for user credentials, validating them and issuing authentication just as the FormsAuthentication class.
Dependency Injection
Injecting an instance of a class into a class that depends on it, is called Dependency Injection.
Dependency Injection is of 2 types.
Dependency Injection is of 2 types.
- Constructor InjectionConstructor Injection, ensures that all the dependency objects are initialized before we attempt to invoke any methods or peroperties, thus avoiding null reference exceptions.
- Setter InjectionSetter Injection, enables you to inject the object, just before you need it. So, if the object is an expensive object to create, and you want to create it as late as possible
- Dependency Injection allows us to develop very loosely coupled systems.
- Easy to swap in a different implementation of a component, as long as the component implements the interface type.
- Dependency Injection, allows objects to be mocked with in the Unit Tests. This is the greatest advantage of Dependency Injection.
Sparse Columns in SQL 2008
Sparse columns are ordinary columns that have an optimized storage for null values. Sparse columns reduce the space requirements for null values at the cost of more overhead to retrieve nonnull values. Consider using sparse columns when the space saved is at least 20 percent to 40 percent. Sparse columns and column sets are defined by using the CREATE TABLE or ALTER TABLE statements.
A sparse column cannot be part of a clustered index or a unique primary key index.
http://blogs.technet.com/b/andrew/archive/2008/02/28/sql-server-2008-sparse-columns.aspx
http://msdn.microsoft.com/en-us/library/cc280604.aspx
A sparse column cannot be part of a clustered index or a unique primary key index.
http://blogs.technet.com/b/andrew/archive/2008/02/28/sql-server-2008-sparse-columns.aspx
http://msdn.microsoft.com/en-us/library/cc280604.aspx
SQL Server 2008 Editions & Difference
- Enterprise Edition
- Standard Edition
- Workgroup Edition
- Web Edition
- Compact Edition
It supports a subset of the standard data types, does not support stored procedures or Views or multiple-statement batches (among other limitations). It is limited to 4 GB maximum database size and cannot be run as a Windows service, Compact Edition must be hosted by the application using it. The 3.5 version includes considerable work that supports ADO.NET Synchronization Services - Express Edition
- SQL Server 2008 Express Edition.
- SQL Server 2008 Express with Tools.
- SQL Server 2008 Express with Advanced Tools.
Subscribe to:
Posts (Atom)
