CodeSmith Generator

What is CodeSmith Generator?
CodeSmith generator is a template-based tool that can produce code for any text-based language. Whether your target language is C#, Visual Basic .NET, T-SQL, Java or even FORTRAN, CodeSmith Generator can help you produce higher-quality, more consistent code in less time than writing code by hand. CodeSmith’s familiar ASP.NET-based template syntax means that you can be writing your first templates within minutes of installing the package. The advanced CodeSmith Generator Explorer integrated development environment (IDE) helps you create and test new templates in a rapid development setting. CodeSmith Generator Projects and ActiveSnippets are integrated within Visual Studio to make code generation a breeze.
CodeSmith also includes a console version and an MSBuild task that you can easily integrate into your automated build process, flexible strategies for merging generated code with custom code, the SchemaExplorer API for integration with relational data sources, and the ability to hook up your own custom metadata sources.

How to use it?
Although CodeSmith Generator has many advanced features, you can begin using it to help produce code without mastering all of those features. In this section, you’ll learn how to use Generator to generate a useful piece of utility code – specifically, a strongly-typed hash table class. This exercise should take you no more than five minutes to complete, but it will introduce you to CodeSmith Explorer, and show you the power of CodeSmith’s template-based code generation scheme.

Why CodeSmith?
CodeSmith’s templates use ASPX-like syntax with a couple of CodeSmith-specific directives. You can create new templates within a few minutes and the best part is that it is all just text so you can edit them and immediately see the results. Using CodeSmith’s templating engine makes the templates more manageable. Instead of storing the generated code in a StringBuilder, constantly appending new lines and worrying about the proper formatting and indenting you can now focus on what the template really must generated and let CodeSmith take care of the rest.

.NET Reflector

What is .NET Reflector?

.NET Reflector is a tool that can be used to explore, analyze, decompile, and debug the contents of any .NET assembly. This tool helps .NET developers understand how a library works, or how it interacts with other parts of a .NET application. The tool can decompile to C#, VB, IL, Managed C++ and some F# features.

.NET Reflector is originally written by Lutz Roeder, and this tool quickly became the world’s most downloaded .NET development tool. MSDN Magazine named .NET Reflector as one of the Ten Must-Have Tools Every Developer Should Download Now, and Scott Hanselman listed it as part of his Big Ten Life and Work-Changing Utilities. In August 2008, Red Gate Software acquired .NET Reflector.

How to use .NET Reflector?
From the File menu, choose Open and browse for the assembly file that you would like to interrogate. As it is shown in the following picture, the code can be converted from C# to IL, Managed C++, Visual Basic, Delphi, Oxygen and F#.

Metro Style App Development Useful Links

Metro Style App Development Useful Links

Metro style apps are designed to leverage special hardware capabilities and context information to create an experience that is tailored for the user. For example, an app that uses sensors to determine your location, delivering content appropriate to that context, while also using an ambient light sensor to adjust the brightness level of the screen. Metro style apps are built using your existing skills and can reuse code assets you already have. If you know web development technologies, you can use HTML5, CSS3, and JavaScript. Or, you can use more traditional programming techniques.

The following links are useful to learn the Metro Style programing model:

1-    Metro Style App Development Official Website

http://msdn.microsoft.com/en-us/library/windows/apps/

2-    Tools for Metro style app development

http://msdn.microsoft.com/en-us/library/windows/apps/br211374%28v=VS.85%29.aspx

3-    Videos of How to Create Metro Style Apps

http://channel9.msdn.com/Events/Build/Build2011

4-    Samples of Metro Style Apps

http://code.msdn.microsoft.com/windowsapps

From C# Learners

5-    Metro Style Apps

https://csharplearners.com/category/metro-style-apps/

From MSDN

6-    Metro Style Apps – Walkthroughs

http://msdn.microsoft.com/en-us/library/windows/apps/hh464943.aspx

http://msdn.microsoft.com/en-us/library/hh440545%28v=vs.110%29.aspx

From Code Project

7-    Metro Style Apps

http://www.codeproject.com/KB/WPF/WpfMetro.aspx

http://www.codeproject.com/KB/gadgets/MetroPuzzle.aspx

http://www.codeproject.com/KB/WinRT/MetroStyleToggleW8DevPre.aspx

http://www.codeproject.com/KB/WinRT/AddAppBarXAMLMetroApp.aspx

http://www.codeproject.com/KB/ThirdParty-Reviews/metroimageprocessing.aspx

http://www.codeproject.com/Articles/269351/WinRT-Transitions-Creating-Fast-and-Fluid-Metro-UI.aspx

http://www.codeproject.com/Articles/255730/TweetSearch-A-Cross-platform-Metro-UI-WinRT-and-Si.aspx

From C# Corners

8-    Major characteristics of UI of the Metro style apps

http://www.c-sharpcorner.com/Blogs/7148/what-makes-an-app-a-metro-style-app.aspx

From CodePlex

9-    Metro Applications

http://8metro.codeplex.com/

10-   MP2 Metro

http://mp2metro.codeplex.com/

11-   Metro Pandora

http://metropandora.codeplex.com/

Burke Holland on HTML5 in Tech.Days 2011

On November 15, 2011, Burke Holland presented in Tech.Days 2011 why HTML5 is the biggest and most powerful HTML specification to ever come out of the W3C. He also explained how to add drop shadows to HTML5 objects, how to create rounded corners, how to use custom fonts, and how to animate with CSS.


What are the webfonts?
The licensing, which is one of the biggest problem of using custom fonts, will not be an isuue whenyou are using webfonts. You just need to add a single CSS or script line to your HTML and some configuration and you are all done. Many like WebInk, Typekit, and Fontslive will allow you to use the fonts for a monthly fee. Using these services is very convenient for the casual developer, handing off some of the complications of serving a cross-browser solution. The Google Font API lets you use a small, curated set of freely licensed fonts by just linking to a stylesheet and letting Google handle the cross-browser and performance concerns. The following is a short list of some webfont providers:
1- http://www.fontsquirrel.com
2- http://webfonts.fonts.com
3- http://typekit.com/libraries
4- http://code.google.com/webfonts

Tomorrow Land (aka Mobile)

NDepend

Patrick Smacchia introduced NDepend in 2007. NDepend is a Visual Studio tool that makes it easy to manage complex .NET code base. The primary motive of NDepend is to allow the Architect to get clear idea about cross dependencies between objects, level of association between them and to find the condition of code easily.

What does NDepend provide?

1- A large number of software metrics (Cyclomatic Complexity, Afferent and Efferent Coupling, Relational cohesion, Google page rank of your types, Percentage of Code covered by tests, etc.)
2- Dependency graphs
3- Dependency matrix
4- Declarative code query
5- Integration with Cruise Control and Team City
6- Code constraints directly in your source code using .NET attributes
7- Compare 2 versions of an assembly: what types were added, removed, etc.

What is Dependency Cycle?

Avoiding dependency cycle between components is the primary principle of strong Software Design. If a component A depends on B, B depends on C and C again depends on A, the component A cannot be tested or developed independently without B and C. Thus A, B and C forms an indivisible unit.

Dependency Structure Matrix (DSM)
DSM is used to get the knowledge on by which extent a namespace is dependent to another. NDepend’s DSM relies on a simple 3 coloring scheme for DSM cell: Blue, Green and Black. When hovering a row or a column with the mouse, the Context-Sensitive Help explains the meaning of this coloring scheme:

NDepend’s DSM comes with the following options:

1- It has numerous facilities to dig into dependency exploration (a parent column/row can be opened, cells can be expanded…)
2- It can deal with squared symmetric DSM and rectangular non-symmetric DSM
3- Horizontal and Vertical headers can be bound, to constantly have a squared symmetric matrix
4- It comes with the option Indirect usage, where cell shows direct and indirect usage
5- The vertical header can contains tier code elements

Kevin Harmer on SharePoint in Tech.Days 2011

On November 16, 2011, Kevin Harmer presented in Tech.Days 2011 how business users can be empowered to create self-service analytic BI applications by harnessing the power of SharePoint.

Microsoft BI Intelligence

1- SharePoint 2010 provides a powerful suite of BI tools that enable self-service BI by power users and analysts.

2- Each SharePoint 2010 BI tool has unique advantages that align to specific performance management use cases, empowering analysts to leverage the right tool for a given corporate BI goal.

– Chart/ Status List Web Parts – quick web part analysis
– Excel Services – corporate analytic
– PowerPivot Services – self-service data integration
– PerformancePoint Services – enterprise scorecards /dashboards
– Visio Services – graphical analysis
– Reporting Services – enterprise reporting

3- Microsoft BI tools are accessible, integrated, robust, and support your organizations data-sources.

4- Fully leverage your existing Microsoft software investment by practicing Microsoft BI.

Stephen Cawood on SharePoint in Tech.Days 2011

On November 16, 2011, Stephan Cawood presented in Tech.Days 2011 the performance of file share migrations and BLOB offloading with EBS, and RBS.

 

 

 

 

 

 

 

 

 

 

File Share Options in SharePoint

Option 1. You can use the out of the box features of SharePoint to upload files
Option 2. You can ‘index’ your content in SharePoint but keep the files on other storage
Option 3. You can use a migration solution to transfer your files with all the associated metadata

SharePoint BLOB Remoting Techniques

A. SharePoint EBS
1- The EBS technique is deprecated in SharePoint 2010, but it is still supported.
2- It is based on Legacy COM architecture. The COM interface is complicated.
3- It does not have orphaned BLOB garbage collection.

B. SQL RBS
1- The RBS techniques is only supported in SharePint 2010.
2- It is based on .NET COM architecture. The .NET interface is well documented.
3- It supports orphaned BLOB garbage collection.

The RBS technique can be used with either of option 2 or option 3.

C. Stubs or HTML Redirects
1- It involves writing to the SharePoint database directly that is not supported.
2- HTML Redirects are not compatible with SharePoint OM use.

Backup and Restore Times for 100 GB Database

HTML 5 Useful Resources

Introduction

HTML 5 (HTML+CSS+JS) brings lots of benefits to your web development teams. Each web development consists of at least two groups: Web developers and web designers. Web developers need to know HTML5. They need to know JavaScript and they need to know CSS. Also, web designers need to know mark-up. They need to know HTML5. They need to be able to write CSS and understand web layout and they need to have at least a decent grasp of what JavaScript does and how JavaScript works. Both of these groups need useful training materials, tutorials, samples and demos. This post is introducing 4 main resources to help these groups to learn how or when to use or adopt HTML 5 in their web pages.

Resource 1: HTML 5 Doctor

HTML 5 doctor is a great resource for learning HTML 5. In this website, you see articles relating to HTML5, its semantics, and how to use it right now.
In the “Article Archive” section, a complete list of all HTML 5 related posts grouped accordingly in order to get you started or to help you understand the specification and specific elements a little more.

Resource 2: HTML 5 Cheat Sheet

HTML 5 cheat sheet is a PDF document which includes a list of all currently supported tags, their descriptions, their attributes and their support in HTML 4. ( HTML 5 Cheat Sheet )

Resource 3: HTML 5 Demos

HTML 5 demos is a great selection of HTML 5 demos. Some of the cool demos from this site are listed below:

1- Interactive canvas gradients ( http://html5demos.com/canvas-grad )
2- Geolocation ( http://html5demos.com/geo )
3- Drag and drop ( http://html5demos.com/drag )

Resource 4: HTML 5 Rocks  

HTML 5 rocks contains various samples and demo code. Some of the cool demos from this site are listed below:

1- Video cube ( http://studio.html5rocks.com/#Cube )
2- Page flip ( http://studio.html5rocks.com/#Flip )
3- WebGL Globe ( http://studio.html5rocks.com/#Globe )

Scott Hanselman on Visual Studio 2011 in Tech.Days 2011

On November 15, 2011, Scott Hanselman presented in Tech.Days 2011 the highlights of the editor of Visual Studio 2011 Developer Preview, as well as a few of his own insights about new features in Windows 8, HTML5, Windows Phone, ASP.NET, MVC, and SignalR.


 

 

 

 

 

 

 

 

 

 

Visual Studio 2011 New Editor Features

1- CSS Color Picker
The background color property comes with the color picker popup.

 

 

 

 

 

 

 

 

 

2- Region Block
Region block can be created in the CSS editor.

 

 

 

 

 

 

 

 

3- Extract to User Control
In the HTML editor you have an option called “Extract to User Control” that allows you to refactor your code and put the selected code in a user control.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Comments:

Scott Hanselman: Great post!

What is New in WCF 4.5?

In the .NET Framework 4.5 Developer Preview, the following features have been added to make it simpler to write Windows Communication Foundation (WCF) applications:

1- Simplification of generated configuration files.
2- Support for contract-first development.
3- Ability to configure ASP.NET compatibility mode more easily.
4- Changes in default transport property values to reduce the likelihood that you will have to set them.
5- Updates to the XmlDictionaryReaderQuotas class to reduce the likelihood that you will have to manually configure quotas for XML dictionary readers.
6- Validation of WCF configuration files by Visual Studio as part of the build process, so you can detect configuration errors before you run your application.
7- New asynchronous streaming support.
8- New HTTPS protocol mapping to make it easier to expose an endpoint over HTTPS with Internet Information Services (IIS).
9- Ability to generate metadata in a single WSDL document by appending ?singleWSDL to the service URL.
10- Websockets support to enable true bidirectional communication over ports 80 and 443 with performance characteristics similar to the TCP transport.
11- Support for configuring services in code.
12- XML Editor tooltips.
13- ChannelFactory caching support.
14- Binary encoder compression support.

Copyright © All Rights Reserved - C# Learners