Programming

LyX/LaTeX formatting for the C# code

If you are googling trying to find a good way to insert C# code in LyX, this is where you'd probably end up. MaPePer has provided a very good solution; I have modified it slightly (hiding tabs and removing comments) and following is illustration on how to use it in LyX.

First thing you'd need is a Lyx document (LyxC#CodeListing.lyx). Empty one works well.

Add the following to Preamble (Document-> Settings-> LaTeX Preamble)

\usepackage{color}
\usepackage{listings}

\lstloadlanguages{% Check Dokumentation for further languages ...
C,
C++,
csh,
Java
}

\definecolor{red}{rgb}{0.6,0,0} % for strings
\definecolor{blue}{rgb}{0,0,0.6}
\definecolor{green}{rgb}{0,0.8,0}
\definecolor{cyan}{rgb}{0.0,0.6,0.6}

\lstset{
language=csh,
basicstyle=\footnotesize\ttfamily,
numbers=left,
numberstyle=\tiny,
numbersep=5pt,
tabsize=2,
extendedchars=true,
breaklines=true,
frame=b,
stringstyle=\color{blue}\ttfamily,
showspaces=false,
showtabs=false,
xleftmargin=17pt,
framexleftmargin=17pt,
framexrightmargin=5pt,
framexbottommargin=4pt,
commentstyle=\color{green},
morecomment=[l]{//}, %use comment-line-style!
morecomment=[s]{/*}{*/}, %for multiline comments
showstringspaces=false,
morekeywords={ abstract, event, new, struct,
as, explicit, null, switch,
base, extern, object, this,
bool, false, operator, throw,
break, finally, out, true,
byte, fixed, override, try,
case, float, params, typeof,
catch, for, private, uint,
char, foreach, protected, ulong,
checked, goto, public, unchecked,
class, if, readonly, unsafe,
const, implicit, ref, ushort,
continue, in, return, using,
decimal, int, sbyte, virtual,
default, interface, sealed, volatile,
delegate, internal, short, void,
do, is, sizeof, while,
double, lock, stackalloc,
else, long, static,
enum, namespace, string},
keywordstyle=\color{cyan},
identifierstyle=\color{red},
}
\usepackage{caption}
\DeclareCaptionFont{white}{\color{white}}
\DeclareCaptionFormat{listing}{\colorbox{blue}{\parbox{\textwidth}{\hspace{15pt}#1#2#3}}}
\captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white, singlelinecheck=false, margin=0pt, font={bf,footnotesize}}

 

In the preamble (Document-> Settings-> LaTeX Preamble)
preamble

 

Now add a program listing block. Hopefully you have the listing package installed otherwise you can always use the listing MikTeX update.

 

insert-program-listing-lyx


Now add the code to the listing block.


lyx-screen

and then Ctrl-R

 

CodeListing

 

Tada!

 

Happy Lyxing

 

References & download LyxC#CodeListing.lyx

 

 

Share

tracert 216.81.59.173

Pretty cool eh!

tracert

Share

AngularJS Learning Resources

AngularJS Overviews/Whirlwind Tours

Everything you need to understand to start with AngularJS
http://stephanebegaudeau.tumblr.com/post/48776908163/everything-you-need-to-understand-to-start-with

 

AngularJS 101: Everything you need to know to get started
http://www.slideshare.net/sbegaudeau/angular-js-101-everything-you-need-to-know-to-get-started

One Hour AngularJS Boot Camp

AngularJS Fundamentals in 60-ish Minutes (free video training)
http://weblogs.asp.net/dwahlin/archive/2013/04/12/video-tutorial-angularjs-fundamentals-in-60-ish-minutes.aspx

 

AngularJS in 60 Minutes (free eBook)
http://fastandfluid.com/publicdownloads/AngularJSIn60MinutesIsh_DanWahlin_May2013.pdf

In-Depth Online Courses

A Better Way to Learn AngularJS
http://www.thinkster.io/pick/GtaQ0oMGIl/a-better-way-to-learn-angularjs

 

AngularJS Tutorial: Learn to Build Modern Web Apps
http://www.thinkster.io/pick/GUIDJbpIie/angularjs-tutorial-learn-to-build-modern-web-apps

Learn-By-Example

Learn AngularJS: 5 Practical Examples
http://tutorialzine.com/2013/08/learn-angularjs-5-examples/

 

Learning AngularJS By Example: The Customer Manager Application
http://weblogs.asp.net/dwahlin/archive/2013/10/25/learning-angularjs-by-example-the-customer-manager-application.aspx

Paid Video Courseware

Pluralsight course: AngularJS Fundamentals Course
http://pluralsight.com/training/Courses/TableOfContents/angularjs-fundamentals

 

Pluralsight course: AngularJS Best Practices
http://pluralsight.com/training/courses/TableOfContents?courseName=angular-best-practices&highlight=

Unit Testing Resources

Unit Testing Best Practices in AngularJS
http://andyshora.com/unit-testing-best-practices-angularjs.html

 

Full Spectrum Testing with AngularJS and Karma
http://www.yearofmoo.com/2013/01/full-spectrum-testing-with-angularjs-and-karma.html

AngularJS Best Practices

AngularJS Advanced Design Patterns & Best Practices
http://trochette.github.io/Angular-Design-Patterns-Best-Practices/#/intro

 

AngularJS Best Practices: I’ve Been Doing It Wrong!
http://blog.artlogic.com/2013/05/02/ive-been-doing-it-wrong-part-1-of-3/

 

AngularJS Best Practices Wiki
https://github.com/angular/angular.js/wiki/Best-Practices

 

AngularJS Anti-Patterns Wiki
https://github.com/angular/angular.js/wiki/Anti-Patterns

 

Building Huuuuuge Apps with AngularJS
http://briantford.com/blog/huuuuuge-angular-apps.html

 

Angular Style Guide
https://github.com/mgechev/angularjs-style-guide

Cheat Sheets

AngularJS Cheat Sheet (Cheatography)
http://www.cheatography.com/proloser/cheat-sheets/angularjs/pdf/

 

AngularJS Cheat Sheet (Opitz Consulting)
http://www.opitz-consulting.com/fileadmin/redaktion/veroeffentlichungen/pdf/CheatSheet-angularJS.pdf

Additional Resources

AngularJS for .NET Developers
http://henriquat.re/

Guide to AngularJS Documentation
http://docs.angularjs.org/guide/

 

Thanks to David Lazar for these links. You rock!

Share

Study Notes for 70-487 - Developing Windows Azure and Web Services

After taking 70-486 - Developing ASP.NET MVC 4 Web Applications couple of weeks ago, I decided to take the final exam  70-487 - Developing Windows Azure and Web Services last week to finish my MCSD certification.

Adnan Masood Microsoft Certified Solution Developer 2

Following are the set of notes I used along with MCT material which may help those preparing for the exam. The topic-by-topic breakdown is courtesy of a colleague and friend Frank Liao.

Accessing Data (24%)

  • Choose data access technologies

    • This objective may include but is not limited to: Choose a technology (ADO.NET [link], Entity Framework [link], WCF Data Services [link link]) based on application requirements

  • Implement caching [link link]

    • This objective may include but is not limited to: Cache static data [link], apply cache policy (including expirations) [link]; Use CacheDependency to refresh cache data [link link]; query notifications [link]

  • Implement transactions [link] [link link link link link link]

    • This objective may include but is not limited to: manage transactions by using the API from System.Transactions namespace; implement distributed transactions; specify transaction isolation level [link]

  • Implement data storage in Windows Azure [link link link link link link]

    • This objective may include but is not limited to: access data storage in Windows Azure; Choose data storage mechanism in Windows Azure (blobs [link], tables [link], queues [link], SQL Database [link link]); Distribute data by using the Content delivery network (CDN) [link]; Handle exceptions by using retries (SQL Database) [link]; manage Windows Azure Caching [link link]

  • Create and implement a WCF Data Services service [link]

    • This objective may include but is not limited to: Address resources [link]; implement filtering [link]; create a query expression [link]; access payload formats (including JSON) [link]; use data service interceptors [link link] and service operators [link]

  • Manipulate XML data structures [link link link link link link link]

    • This objective may include but is not limited to: Read, filter, create, modify XML data structures; Manipulate XML data by using XMLReader [link], XMLWriter [link], XMLDocument [link], XPath [link], LINQ to XML [link]; transform XML by using XSLT transformations [link]

Querying and Manipulating Data by Using the Entity Framework (20%)

  • Query and manipulate data by using the Entity Framework.

    • This objective may include but is not limited to: Query [link], update, and delete data by using DbContext [link]; build a query that uses deferred execution [link]; implement lazy loading and eager loading [link link link]; create and run compiled queries [link link]; query data by using Entity SQL [link]

  • Query and manipulate data by using Data Provider for Entity Framework [link]

    • This objective may include but is not limited to: Query and manipulate data by using Connection, DataReader, Command from the System.Data.EntityClient namespace [link link link]; perform synchronous and asynchronous operations [link link]; manage transactions (API) [link link]

  • Query data by using LINQ to Entities. [link]

    • This objective may include but is not limited to: query data by using LINQ operators (for example, project, skip, aggregate, filter, and join) [link link link link]; log queries [link link]; implement query boundaries (IQueryable vs. IEnumerable) [link link link]

  • Query and manipulate data by using ADO.NET [link]

    • This objective may include but is not limited to: Query and manipulate data by using Connection, DataReader, Command, DataAdapter, DataSet [link link link]; Perform synchronous and asynchronous operations [link link]; Manage transactions (API) [link]

  • Create an Entity Framework data model. [link link]

    • This objective may include but is not limited to: Structure the data model using Table per type [link link], table per class, table per hierarchy [link link]; Choose and implement an approach to manage a data model (code first [link link] vs. model first [link] vs. database first [link]); implement POCO objects [link link link]; Describe a data model by using conceptual schema definitions, storage schema definition, and mapping language (CSDL, SSDL, MSL) [link link]

Designing and Implementing WCF Services (19%)

  • Create a WCF service

    • This objective may include but is not limited to: Create contracts (service [link], data [link], message [link], callback [link link], and fault [link]); implement message inspectors [link]; implement asynchronous operations in the service [link]

  • Configure WCF services by using configuration settings [link link link]

    • This objective may include but is not limited to: Configure service behaviors; Configure service endpoints; configure binding; specify a service contract; expose service metadata (XSDs, WSDL, and metadata exchange endpoint)

  • Configure WCF services by using the API [link link link]

    • This objective may include but is not limited to: Configure service behaviors [link]; Configure service endpoints [link link]; configure binding [link]; specify a service contract; Expose service metadata (XSDs, WSDL, and metadata exchange) [link]; WCF routing [link] and discovery [link] features

  • Secure a WCF service

    • This objective may include but is not limited to: Implement message level security [link], implement transport level security [link]; implement certificates [link link]

  • Consume WCF services

    • This objective may include but is not limited to: Generate proxies by using SvcUtil [link]; generate proxies by creating a service reference [link]; create and implement channel factories [link]

  • Version a WCF service [link link link link]

    • This objective may include but is not limited to: Version different types of contracts (message, service, data); configure address, binding, and routing [link] service versioning

  • Create and configure a WCF service on Windows Azure [link link link link link link]

    • This objective may include but is not limited to: Create and configure bindings for WCF services (Azure SDK-- extensions to WCF); Relay bindings to Azure using service bus endpoints [link link link]; integrate with the Azure service bus relay [link]

  • Implement messaging patterns [link link]

    • This objective may include but is not limited to: Implement one way [link], request/reply [link], streaming [link], and duplex communication [link]; implement Windows Azure Service Bus [link] and Windows Azure Queues [link] [link link link]

  • Host and manage services

    • This objective may include but is not limited to: Manage services concurrency (single, multiple, reentrant) [link link link]; Create service hosts; Choose a hosting mechanism [link link]; choose an instancing mode (per call, per session, singleton) [link link]; activate and manage a service by using AppFabric [link link link]; implement transactional services [link link]; host services in an Windows Azure worker role [link]

Creating and Consuming Web API-based services (18%) [link]

  • Design a Web API [link link link link link]

    • This objective may include but is not limited to: define HTTP resources with HTTP actions; plan appropriate URI space, and map URI space using routing; choose appropriate HTTP method (get, put, post, delete) to meet requirements; choose appropriate format (Web API formats) for responses to meet requirements; plan when to make HTTP actions asynchronous

  • Implement a Web API [link link]

    • This objective may include but is not limited to: accept data in JSON format (in JavaScript, in an AJAX callback) [link]; use content negotiation to deliver different data formats to clients [link]; define actions and parameters to handle data binding [link]; use HttpMessageHandler to process client requests and server responses [link]; implement dependency injection, along with the dependency resolver, to create more flexible applications [link]; implement action filters and exception filters to manage controller execution [link]; implement asynchronous and synchronous actions; implement streaming actions

  • Secure a Web API [link]

    • This objective may include but is not limited to: implement HTTPBasic authentication over SSL; implement Windows Auth; enable cross-domain requests [link link]; prevent cross-site request forgery (XSRF); implement, and extend, authorization filters to control access to the application [link]

  • Host and manage Web API [link]

    • This objective may include but is not limited to: host Web API in an ASP.NET app [link link]; self-host a Web API in your own process (a Windows service) [link link]; host services in a Windows Azure worker role [link link]; restricting message size [link]; configure the host server for streaming [link]

  • Consume Web API web services

    • This objective may include but is not limited to: consume Web API services by using HttpClient synchronously and asynchronously [link]; send and receive requests in different formats (JSON/HTML/etc.) [link]

Deploying Web Applications and Services (19%)

  • Design a deployment strategy

    • This objective may include but is not limited to: Create an IIS install package [link link]; deploy to web farms [link]; deploy a web application by using XCopy [link link]; automate a deployment from TFS or Build Server [link link link link link]

  • Choose a deployment strategy for a Windows Azure web application

    • This objective may include but is not limited to: Perform an in-place upgrade and VIP swap [link link]; configure an upgrade domain [link]; create and configure input and internal endpoints [link link]; specify operating system configuration [link link]

  • Configure a web application for deployment

    • This objective may include but is not limited to: switch from production/release mode to debug mode; use SetParameters to set up an IIS app pool [link link], set permissions and passwords) [link]; configure WCF endpoints, bindings, and behaviors [link link link link link]; transform web.config by using XSLT (for example, across development, test, and production/release environments) [link link]; configure Azure configuration settings [link]

  • Manage packages by using NuGet [link link]

    • This objective may include but is not limited to: Create and configure a NuGet package [link]; install and update an existing NuGet package [link link]; connect to a local repository cache for NuGet [link], set up your own package repository [link]

  • Create, configure, and publish a web package [link]

    • This objective may include but is not limited to: Create an IIS InstallPackage [link]; configure the build process to output a web package [link]; apply pre- and post- condition actions to ensure that transformations are correctly applied [link]; include appropriate assets (web content, certificates) [link]

  • Share assemblies between multiple applications and servers

    • This objective may include but is not limited to: Prepare the environment for use of assemblies across multiple servers (interning) [link]; sign assemblies by using a strong name [link]; deploy assemblies to the global assembly cache [link link]; implement assembly versioning [link]; create an assembly manifest [link]; configure assembly binding redirects (for example, from MVC2 to MVC3 [link]

Share

Study Notes for 70-486 - Developing ASP.NET MVC 4 Web Applications

After the 70-480 Programming HTML5 and CSS 3 Exam, I finally got around to taking 70-486 - Developing ASP.NET MVC 4 Web Applications which gets me 2/3 towards the destination for MCSD: Web Applications. Following are the set of notes I used along with MCT material which may help those preparing for the exam. The topic-by-topic breakdown is courtesy of a colleague and friend Frank Liao.

[link link link]

Design the Application Architecture

  • Plan the application layers.

    • This objective may include but is not limited to: plan data access; plan for separation of concerns; appropriate use of models, views, and controllers; choose between client-side and server side processing; design for scalability

  • Design a distributed application. [link]

    • This objective may include but is not limited to: design a hybrid application (on premise vs. off premise, including Windows Azure) [link link]; plan for session management in a distributed environment; plan web farms

  • Design and implement the Windows Azure role life cycle. [link link link link]

    • This objective may include but is not limited to: identify and implement Start, Run, and Stop events [link link];identify startup tasks (IIS configuration [app pool] [link], registry configuration [link], third-party tools [link]) [link]

  • Configure state management.

    • This objective may include but is not limited to: choose a state management mechanism (in-process and out of process state management, ViewState); plan for scalability; use cookies or local storage to maintain state; apply configuration settings in web.config file; implement sessionless state (for example, QueryString) [link]

  • Design a caching strategy.

    • This objective may include but is not limited to: implement page output caching (performance oriented); implement data caching; implement HTTP caching

  • Design and implement a Web Socket strategy. [link]

    • This objective may include but is not limited to: read and write string and binary data asynchronously (long-running data transfers); choose a connection loss strategy; decide a strategy for when to use Web Sockets

  • Design HTTP modules and handlers. [link link]

    • This objective may include but is not limited to: implement synchronous and asynchronous [link link] modules and handlers; choose between modules and handlers in IIS [link]

Design the User Experience

  • Apply the user interface design for a web application.

    • This objective may include but is not limited to: create and apply styles by using CSS; structure and lay out the user interface by using HTML; implement dynamic page content based on a design

  • Design and implement UI behavior.

    • This objective may include but is not limited to: implement client validation; use JavaScript and the DOM to control application behavior; extend objects by using prototypal inheritance; use AJAX to make partial page updates [link]; implement the UI by using JQuery

  • Compose the UI layout of an application.

    • This objective may include but is not limited to: implement partials for reuse in different areas of the application [link]; design and implement pages by using Razor templates (Razor view engine) [link link]; design layouts to provide visual structure; implement master/application pages [link]

  • Enhance application behavior and style based on browser feature detection. [link link link link]

    • This objective may include but is not limited to: detect browser features and capabilities; create a web application that runs across multiple browsers and mobile devices; enhance application behavior and style by using vendor-specific extensions, for example, CSS

  • Plan an adaptive UI layout.

    • This objective may include but is not limited to: plan for running applications in browsers on multiple devices (screen resolution, CSS, HTML); plan for mobile web applications [link]

Develop the User Experience

  • Plan for search engine optimization and accessibility.[link]

    • This objective may include but is not limited to: use analytical tools to parse HTML; view and evaluate conceptual structure by using plugs-in for browsers [link]; write semantic markup (HTML5 and ARIA) for accessibility, for example, screen readers [link link]

  • Plan and implement globalization and localization. [link link link link link]

    • This objective may include but is not limited to: plan a localization strategy; create and apply resources to UI including JavaScript resources; set cultures; create satellite resource assemblies

  • Design and implement MVC controllers and actions.

    • This objective may include but is not limited to: apply authorization attributes [link] and global filters [link link]; implement action behaviors [link link]; implement action results [link]; implement model binding [link]

  • Design and implement routes. [link link link link]

    • This objective may include but is not limited to: define a route to handle a URL pattern [link]; apply route constraints [link link]; ignore URL patterns [link]; add custom route parameters [link]; define areas [link]

  • Control application behavior by using MVC extensibility points.

    • This objective may include but is not limited to: implement MVC filters [link link] and controller factories [link link]; control application behavior by using action results [link link], viewengines [link], model binders [link], and route handlers [link]

  • Reduce network bandwidth.

    • This objective may include but is not limited to: bundle and minify scripts (CSS and JavaScript) [link link]; compress and decompress data (using gzip/deflate; storage) [link]; plan a content delivery network (CDN) strategy, for example, Windows Azure CDN [link]

Troubleshoot and Debug Web Applications

  • Prevent and troubleshoot runtime issues.

    • This objective may include but is not limited to: troubleshoot performance, security, and errors;implement tracing, logging (including using attributes for logging) [link], and debugging (including IntelliTrace) [link link]; enforce conditions by using code contracts [link link]; enable and configure health monitoring (including Performance Monitor) [link]

  • Design an exception handling strategy. [link link]

    • This objective may include but is not limited to: handle exceptions across multiple layers; display custom error pages using global.asax or creating your own HTTPHandler or set web.config attributes; handle first chance exceptions

  • Test a web application.

    • This objective may include but is not limited to: create and run unit tests, for example, use the Assert class, create mocks; create and run web tests

  • Debug a Windows Azure application.

    • This objective may include but is not limited to: collect diagnostic information by using Windows Azure Diagnostics API Implement on demand vs. scheduled; choose log types, for example, event logs, performance counters, and crash dumps [link]; debug a Windows Azure application by using IntelliTrace [link] and Remote Desktop Protocol (RDP) [link link]

Design and Implement Security

  • Configure authentication.

    • This objective may include but is not limited to: authenticate users; enforce authentication settings; choose between Windows [link], Forms [link link], and custom [link] authentication; manage user session by using cookies [link]; configure membership providers [link]; create custom membership providers [link]

  • Configure and apply authorization. [link]

    • This objective may include but is not limited to: create roles; authorize roles by using configuration; authorize roles programmatically ; create custom role providers [link link]; implement WCF service authorization [link link]

  • Design and implement claims-based authentication across federated identity stores. [link]

    • This objective may include but is not limited to: implement federated authentication by using Windows Azure Access Control Service [link]; create a custom security token by using Windows Identity Foundation [link]; handle token formats (for example, oAuth, OpenID, LiveID, and Facebook) for SAML and SWT tokens [link link link link]

  • Manage data integrity. [link]

    • This objective may include but is not limited to: apply encryption to application data [link]; apply encryption to the configuration sections of an application [link]; sign application data to prevent tampering [link]

  • Implement a secure site with ASP.NET. [link]

    • This objective may include but is not limited to: secure communication by applying SSL certificates; salt and hash passwords for storage [link link]; use HTML encoding to prevent cross-site scripting attacks (ANTI-XSS Library) [link link]; implement deferred validation [link] and handle unvalidated requests [link], for example, form, querystring, and URL [link]; prevent SQL injection attacks by parameterizing queries [link]; prevent cross-site request forgeries (XSRF) [link]

Share

Cloud Computing and CQRS Resources

MSDN Blogs: Cloud Architecture Series - CQRS Part 1 (Bruno Terkaly)

MSDN Magazine: CQRS on Windows Azure (Mark Seeman)
http://msdn.microsoft.com/en-us/magazine/gg983487.aspx

Book: Exploring CQRS and Event Sourcing: A journey into high scalability, availability, and maintainability with Windows Azure (MS Patterns & Practices)
http://www.amazon.com/Exploring-CQRS-Event-Sourcing-maintainability/dp/1621140164
And a few backgrounders:
CQRS - a new architecture precept based on segregation of commands and queries (Marco Heimeshoff, Philip Jander)
http://www.h-online.com/developer/features/CQRS-an-architecture-precept-based-on-segregation-of-commands-and-queries-1803276.html

CQRS Starting Page (Rinat Abdullin)
http://abdullin.com/cqrs/

The Best Way to Learn CQRS, DDD, and Event SOurcing (Rinat Abdullin)
http://abdullin.com/journal/2010/9/10/the-best-way-to-learn-cqrs-ddd-and-event-sourcing.html

MSDN: CQRS Journey Project
http://msdn.microsoft.com/en-us/library/jj554200

Slides: CQRS: Command/Query Responsibility Segregation
http://www.slideshare.net/brianritchie1/cqrs-command-query-responsibility-segregation

Slides: CQRS and Event Sourcing, An Alternative Architecture for DDD (Dennis Doomen)
http://www.slideshare.net/dennisdoomen/cqrs-and-event-sourcing-an-alternative-architecture-for-ddd

When to Avoid CQRS (Udi Dahan)
CQRS is Too Complicated (Rob Ashton)
"I think the main problem with DDD and CQRS is that they are misappropriately used.  The vast majority of systems do not  need this level of sophistication. What is more worrying is that .NET has adopted CQRS as their new and shinny. 
I shudder at people using either for CRUD but I suspect it does happen."
--Paul Cowan
courtesy of David Lazar
Share

Writing High Quality Code in C# by Svetlin Nakov

 

This is an excellent presentation by Svetlin Nakov of Telerik which I thoroughly enjoyed and decided to share it via my blog. Following is the abstract.

The author introduces the principles of high-quality programming code construction during the software development process. The quality of the code is discussed in its most important characteristics – correctness, readability and maintainability. The principles of construction of high-quality class hierarchies, classes and methods are explained. Two fundamental concepts – “loose coupling” and “strong cohesion” are defined and their effect on the construction of classes and subroutines is discussed. Some advices for correctly dealing with the variables and data are given, as well as directions for correct naming of the variables and the rest elements of the program. Best practices for organization of the logical programming constructs are explained. Attention is given also to the “refactoring” as a technique for improving the quality of the existing code. The principles of good formatting of the code are defined and explained. The concept of “self-documenting code” as a programming style is introduced.

Share

Enterprise Node Advocacy Talk

Node.js adaptability in a medium to large, regulated enterprise can be quite challenging; various process items including risk & compliance, OSS, supportability, static-code analysis, IDE/SC integration info-sec concerns etc need to be addressed before any new technology can be adapted.

My co-worker Daniel Imrie-Situnayake did a great presentation on this very topic titled "Within the Whale: a story of enterprise Node advocacy from the inside out". 

Share

WCF vs. ASP.NET Web API – An Architect’s Primer - Speaking to Southern California .NET Architecture Users Group

I will be speaking to the next Southern California .NET Architecture Users Group - IASA chapter meeting will be Thursday February 21, 2013 at Rancho Santiago Community College District, 2323 N. Broadway, Santa Ana.

Meeting starts at 7:00 pm, pizza and networking 6:30 pm. Abstract follows.

WCF vs. ASP.NET Web API – An Architect’s Primer

ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. The new ASP.NET Web API is a continuation of the previous WCF Web API projection. WCF was originally created to enable SOAP-based services and other related bindings. However, for simpler RESTful or RPCish services (think clients like jQuery) ASP.NET Web API is a good choice.

In this meeting we discuss what do you need to understand as an architect to implement your service oriented architecture using WCF or ASP.NET web API. With code samples, we will elaborate on WCF Web API’s transition to ASP.NET Web API and respective constructs such as Service vs. Web API controller, Operation vs. Action, URI templates vs ASP.NET Routing, Message handlers, Formatters and Operation handlers vs Filters, model binders. WebApi offers support for modern HTTP programming model with full support for ASP.NET Routing, content negotiation and custom formatters, model binding and validation, filters, query composition, is easy to unit test and offers improved Inversion of Control (IoC) via DependencyResolver.

You will walk away with a sample set of services that run on Silverlight, Windows Forms, WPF, Windows Phone and ASP.NET.

 

Downloads: Slides and Source

Share

Study Notes for 70-480 Programming HTML5 and CSS 3 Exam

Having recently taken 70-480 Programming HTML5 and CSS 3 Exam, I think these notes I made may help those preparing for the exam. The topic-by-topic breakdown is courtesy of a colleague and friend Frank Liao.

 

Implement and Manipulate Document Structures and Objects (24%)

  • Create the document structure. [link link]
    • This objective may include but is not limited to: structure the UI by using semantic markup, including for search engines and screen readers (Section [link], Article [link], Nav [link], Header [link], Footer [link], and Aside [link]); create a layout container in HTML
  • Write code that interacts with UI controls.
    • This objective may include but is not limited to: programmatically add and modify HTML elements [link link link]; implement media controls [link link]; implement HTML5 canvas [link link] and SVG graphics [link]
  • Apply styling to HTML elements programmatically. [link]
    • This objective may include but is not limited to: change the location of an element [link]; apply a transform [link link]; show and hide elements [link]
  • Implement HTML5 APIs.
    • This objective may include but is not limited to: implement storage APIs [link link], AppCache API [link link], and Geolocation API [link]
  • Establish the scope of objects and variables.
    • This objective may include but is not limited to: define the lifetime of variables [link]; keep objects out of the global namespace [link link]; use the “this” keyword to reference an object that fired an event [link]; scope variables locally and globally [link]
  • Create and implement objects and methods. [link link]
    • This objective may include but is not limited to: implement native objects [link];

Implement Program Flow (25%)

  • Implement program flow.
    • Iterate across collections and array items [link]; manage program decisions by using switch statements [link], if/then [link], and operators [link]; evaluate expressions [link]
  • Raise and handle an event.
    • This objective may include but is not limited to: handle common events exposed by DOM (OnBlur [link], OnFocus [link], OnClick [link]); declare and handle bubbled events [link]; handle an event by using an anonymous function [link]
  • Implement exception handling.
    • This objective may include but is not limited to: set and respond to error codes [link link]; throw an exception [link]; request for null checks [link]; implement try-catch-finally blocks [link]
  • Implement a callback.
    • This objective may include but is not limited to: receive messages from the HTML5 WebSocket API [link]; use JQuery to make an AJAX call [link]; wire up an event [link]; implement a callback by using anonymous functions; handle the “this” pointer
  • Create a web worker process. [link link]

Access and Secure Data (26%)

  • Validate user input by using HTML5 elements. [link]
  • Validate user input by using JavaScript.
    • This objective may include but is not limited to: evaluate a regular expression to validate the input format [link]; validate that you are getting the right kind of data type by using built-in functions [link]; prevent code injection
  • Consume data.
    • This objective may include but is not limited to: consume JSON [link] and XML [link] data; retrieve data by using web services; load data or get data from other sources by using XMLHTTPRequest [link]
  • Serialize, deserialize, and transmit data. [link]
    • This objective may include but is not limited to: binary data [link]; text data (JSON, XML) [link link link]; implement the JQuery serialize method [link]; Form.Submit [link]; parse data [link link link]; send data by using XMLHTTPRequest [link]; sanitize input by using URI/form encoding [link link]

Use CSS3 in Applications (25%)

  • Style HTML text properties.
    • apply styles to text appearance (color [link], bold [link], italics [link]); apply styles to text font (WOOF and @font-face, size, understudy fonts) [link]; apply styles to text alignment [link], spacing [link], and indentation [link]; apply styles to text hyphenation [link]; apply styles for a text drop shadow [link]
  • Style HTML box properties.
    • This objective may include but is not limited to: apply styles to alter appearance attributes (size [link link], border [link] and rounding border corners [link link], outline [link], padding [link], margin [link]); apply styles to alter graphic effects (transparency, opacity [link], background image [link], gradients [link], shadow [link], clipping [link link]); apply styles to establish and change an element’s position (static, relative, absolute, fixed) [link]
  • Create a flexible content layout.
    • This objective may include but is not limited to: implement a layout using a flexible box model [link]; implement a layout using multi-column [link]; implement a layout using position floating and exclusions [link]; implement a layout using grid alignment [link]; implement a layout using regions [link], grouping, and nesting [link]
  • Create an animated and adaptive UI.
  • Find elements by using CSS selectors and JQuery. [link]
    • pseudo-elements [link] and pseudo-classes [link]
  • Structure a CSS file by using CSS selectors. [link]
Share
Go to Top