07 October 2015

CMG India 2015: 2nd Annual Conference

CMG India (Computer Measurement Group) will be conducting its 2nd Annual conference of India Chapter at Bangalore on Nov 27-28, 2015.

This will be a two day event with participation from various companies.

Keynote addresses will be from Google and Xerox. Interesting sessions are lined up from participants working in various technology companies across India.

For more information, visit - http://www.cmgindia.org/cmg-india-2nd-annual-conference/

For registration, visit - http://iamonline.xyz/cmgindia/




SharePoint ULS Log viewer

​Many times we need to look at SharePoint ULS logs for various log, error, exception information. It is cumbersome to look at ULS logs using notepad.

Microsoft provides a free tool which helps in viewing ULS logs in an easy to read format.

You can download the tool from here - http://www.microsoft.com/en-in/download/details.aspx?id=44020

To read more about this tool, refer following link - http://www.codeproject.com/Articles/458052/ULS-Log-Viewer

Happy Debugging!

06 October 2015

Making flash content (.swf files) work in Sharepoint 2010

If flash content (.swf) files are hosted on SharePoint 2010, they do not work by default.

The reason for this is that 'shockwave/flash' mime type is not enabled by default on SharePoint 2010.

To check if 'shockwave/flash' mime type is enabled or not on SharePoint site, perform following steps -

  • Open SharePoint power shell with admin privileges
  • Run following commands on power shell -
$webapp = Get-SPWebApplication "<SharePoint site URL>"
$webapp.AllowedInlineDownloadedMimeTypes
This will list all available mime types on SharePoint
  • Check if "application/x-shockwave-flash"exists in available mime types
  • If not, run the following commands - 
$webapp = Get-SPWebApplication "<SharePoint site URL>"
$webapp.AllowedInlineDownloadedMimeTypes.Add("application/x-shockwave-flash")
$webapp.Update()
  • Restart SharePoint app-pool or perform IIS Reset
Flash content should now work in SharePoint 2010.

05 October 2015

AWS re: Invent 2015 - Infosys is a Silver sponsor

AWS re: Invent 2015 is being held at Las Vegas, Nevada between Oct 6 - 9, 2015.

AWS (Amazon Web Services) is being used world-wide now as a cloud platform for application development and deployment. This event is an excellent opportunity for developers, technical architects, managers, decision makers, service providers and partners to get insight about Amazon Web Services and how to utilize this technology for their technical and business needs.

Infosys is a Silver sponsor at this event and will be present at booth # 1051 to showcase its expertise on AWS.

To know more about event, visit https://reinvent.awsevents.com/

Open Group Event (Hyderabad, India) - Call for submission of presentation proposals

The Open Group will be holding its event at Hyderabad, India on Feb 11 - 12, 2016.

The Open Group invites presentation proposals for this event on the following themes -

  • e-Government
  • IT4IT™
The last date for submission is Jan 4, 2016.

Presentation proposals can be submitted at this link.



04 October 2015

SharpKit - Useful JavaScript extension for Visual Studio

Not everyone is well versed with JavaScript but most of us have good command over C#. In case you have to write JavaScript code in your project, here is a good Visual Studio Extension that you can use.

The extension is called SharpKit and is available at http://visualstudiogallery.msdn.microsoft.com/742f8cdc-85f7-41de-8d46-3c42b33e702b

It allows you to write C# 4.0 code and convert it to JavaScript during compilation. It supports following JavaScript libraries -

  • JavaScript and HTML 
  • jQuery 
  • jQuery UI 
  • jQuery Mobile 
  • ExtJS 
  • ASP.NET Ajax

Supported C# features - 
  • Namespaces 
  • Classes, interfaces, delegates, enums and generics 
  • Static classes, partial classes 
  • Static methods, instance methods, extension methods 
  • Optional parameters, named parameters, method overloads 
  • Implicit delegates, anonymous delegates, lambda expressions, LINQ 
  • Inheritance, polymorphism, casting, as/is 
  • Enumerables 

Happy Coding !

03 October 2015

Best Practices – XAML & Silverlight

While working on Silverlight projects for past couple of years, I have collated a list of best practices for Silverlight and XAML.

Performance

Best Practice
Reason
1.        
Don’t use unnecessary “xmlns” namespaces in the XAML file.
·         Tip - If you are using Resharper, it will change the color of the unnecessary items to Grey.

This overburdens the load time of the Silverlight page
2.        
Remove all unnecessary resource keys if they are not in use.

They increase memory usage
3.        
Try to use StaticResource instead of DynamicResource
1.       It improves performance.
2.        Helps in detecting exceptions at compile time rather than at run time.

4.        
Minimize your download size – Add only required assembly references and resources (images, CSS, JavaScript etc.) to your Silverlight project.

This reduces time taken to load the application
5.        
Minimize Disk & Network I/O – Try to use chunky calls instead of chatty ones. Retrieve data in a batch rather than contacting server repeatedly.

This reduces performance overhead due to network and disk latency.
6.        
Load Fewer Assemblies at Startup – Load only required assemblies at startup of application. Download additional assemblies either in background later or on demand.

This reduces the startup time for application
7.        
Try to reduce usage of transparent background
Transparent background has a significant effect on performance
8.        
Minimize use of FindName calls: FindName method finds the target by walking through the entire XAML tree.

This affects the performance significantly.
9.        
Hide unused controls in full screen: When the application goes into full screen mode, unused objects need to be hidden.

This makes the page lighter and faster in full screen mode.
10.     
Remove dead XAML.  If a style or a part of your tree is no longer used, remove it.
This will lead to better performance of your page.

11.     
Prefer Templates over UserControls.

This is especially important in say, a DataGrid cell template, where hundreds of cells are styled the same way.  If you style your cell using a UserControl, you are going to parse the same XAML hundreds of times over.  By using a template you ensure that this XAML is only parsed once!

UserControls need to be re-parsed per instantiation, templates are parsed only once. This improves performance.
12.     
Minimize your element count – Add only required XAML elements which contribute to appearance, formatting & functionality.


Every element that you add to the visual tree adds to the amount of time that it takes to parse
13.     
Don’t add same namespaces multiple times in a single XAML page. It leads to duplication and loads the assembly namespace multiple times.
This can lead to memory issues at runtime.

14.     
Give name to only required controls in XAML which will be used specifically in code behind or XAML

Note – This contradicts with naming convention best practice though. 

It reduces unnecessary object creation at page load and improves performance.

Code building


Best Practice
Reason
1.        
When adding a control that has no elements inside it, better to close it by self-closing tag “/>” instead of the hard closing tag (</TAG>).

This gives cleaner XAML code.

2.        
Don’t use extra panels (e.g. Grid, StackPanel, Canvas etc.) unless it is required.

This gives cleaner XAML code.

3.        
Always try to use Grid as your first layout panel. Also try to use Grid as container for other controls.

Grid has the flexible UI layout and resizes itself as per the controls placed in it.

4.        
Use the Visibility property of the controls instead of the Opacity property to hide the content.
Opacity to zero makes the control to hide but takes space in both memory and the UI.

Visibility property collapses the control from the UI, thus making space for other controls.

5.        
Use proper formatting of your XAML code.
This gives better look of code and also easy to maintain in future.

6.        
Use comments in XAML whenever require.
This is useful when you revisit the code after a long time or some other person comes to work with your XAML file.

7.        
Remove unnecessary styles & storyboard animations if they are not required.

Reduces cluttering of XAML code.
8.        
Try to add your styles in a separate file if you want to share them across your application.

If they are specific to a single page then add them in the page resource.

Helps in code separation and easy maintenance.
9.        
As Silverlight is resolution dependant, it is advisable to use auto-resizing components.


10.     
A canvas control does not resize itself. Hence it has to be used only in cases where the height and width are to be fixed.


11.     
Avoid applying themes to DataGrid control: Silverlight provides a DataGrid control which has binding property to display data in the form of Grid. Themes should not be applied to the DataGrid as its performance degrades (specially the datagrid scrollbar) significantly when themes are applied. It is also affected when using opacity property.


12.     
Use RowDefinitions & ColumnDefinitions with star (*) value to structure the layout.
This will ensure that the website will fit in any resolution.



Naming conventions



Best Practice
Reason
1.        
Try to specify an x:Name attribute for every element in XAML
Note - This however has a performance implication. So if application performance is slow in end, you can try removing x:Name attribute for elements where not required.

Forcing an x:Name on an object really makes you think of the purpose of that element and whether it is really required.
2.        
Use proper name for your “xmlns” namespace prefix. For example: xmlns:commonControls is more meaningful than xmlns:cctrl.
This avoids multiple declarations of namespaces in future & creates meaningful prefixes.
3.        
Be consistent. Use the same xmlns namespace abbreviation across all XAML files, and use a consistent abbreviation technique.


4.        
When assigning a name, use the x:Name attribute for consistency.


5.        
Use Pascal casing.

More readable & self-explanatory.
6.        
Provide meaningful names. Instead of a name like border1, use something like TrackBackgroundBorder.

Meaningful.
7.        
Make the x:Name attribute the first attribute after a type instance, like this:
<Button x:Name="CancelButton" ... />

Consistency
8.        
All resources should have an x:Key attribute. Silverlight allows you to use the Name attribute instead of Key, but avoid that practice for consistency with WPF.

Consistency
9.        
For resource keys, use Pascal casing and follow the same meaningful postfix convention followed for x:Names.

More readable & self-explanatory.
10.     
It is good to have each attribute on a separate line.


11.     
If keeping multiple attributes on same line, they should be related and grouped such as HorizontalAlignment and VerticalAlignment


12.     
Instead of pre or post-fixing element names, give them a descriptive name.  Instead of:
a.        btnSubmit use SubmitButton,
b.       grdContent use ContentPanel,
c.        stkPnlNav use NavigationPanel.


02 October 2015

SQL Server 2012 - Auto Incrementing Identity Column

From SQL server 2012 onward, Auto incrementing column value jumps by 1000 or 10000 (depending on data type) on server restart.

This happens because SQL Server defines a cache size of 1000 or 10000 for IDENTITY and this cache is lost on server restart.

This can lead to loss in continuity if an auto incrementing column is used for any specific purpose like maintaining order no. etc.

To circumvent this, either use 'Sequence' feature of SQL Server or register 't272' as sql server startup parameter (which is server level change).

Refer to following links for details -

http://www.codeproject.com/Tips/668042/SQL-Server-2012-Auto-Identity-Column-Value-Jump-Is

http://stackoverflow.com/questions/14146148/identity-increment-is-jumping-in-sql-server-database

01 October 2015

Open Group Event - Edinburgh (Oct 19 - 22, 2015)

Open Group Event is being held in Edinburgh, UK between Oct 19 - 22, 2015 at 'Edinburgh International Conference Centre'

The event will see the launch of new IT4IT™ Reference Architecture v2.0 Standard.

Key Speakers are -
  • Steve Cole, CIO, BAE Systems Submarine Solutions
  • Dr. Ron Ashkenas, Senior Partner, Schaffer Consulting
  • Allen Brown, President & CEO, The Open Group
  • Mary Jarrett, IT4IT™ & Cost Performance Improvement Manager, Shell

For Event Summary - Click here

For Event Agenda - Click here

For Event Fee - Click here

For Registration - Click here

STARWEST 2015 - Infosys is a Platinum Sponsor

STARWEST 2015 is being held between Sep 30 - Oct 01, 2015 at Anaheim California. It is a premier event focused on software testers and quality control professionals around the world. Infosys is a Platinum Sponsor at this event.

For more details visit -

http://starwest.techwell.com/
http://www.infosys.com/newsroom/events/Pages/starwest-2015.aspx