Android Studio Java setup using the JAVA_HOME variable

I’ve just begun using Android Studio again after a long layoff.

After noticing a sharp rise in configuration errors using the old version of the system, and taking the advice of forum posts on the subject, I decided to re-install the Android Studio application from the recommended source website – http://developer.android.com/sdk/. An update to my current Java version was also required – https://java.com/en/download/ (which I carried out with reservations, but which was a necessary step to support the new version of the IDE). My chosen ANDROID STUDIO Version was 2.1 preview 5.

After downloading and opening the zip file provided I noticed that no installation is required to use the Application. I just had to drop the entire folder tree into my Program Files Directory on my Windows 7 32 bit O/S machine. For the executable I had a look in the ‘C:\Program Files\android-studio\bin’ folder and sure enough found the required file. On running the .exe the following error dialog was generated which stopped my from continuing:

By using the Control Panel I was able to navigate to the suggested configuration pane by selecting ‘System’ followed by ‘Advanced System Settings’ and the pressing the ‘Environmental Variables’ button. Here I noticed that the suggested JAVA_HOME variable was already set in the lower ‘System Variables’ panel. It turned out that I needed to add the ‘JAVA_HOME’ variable in the upper panel ‘User variables for Rob’, in order to get Android Studio to load correctly on my PC.

Windows 7 Environmental variables dialog

Note: This post assumes that the current Java version has been installed on the users machine. I’m posting this as much as a reminder to myself for future reference. I hope you find it of some use reader. I expect if I get time I will will be adding to the ‘Memory Jogger’ Posts over the next few months as I try to get up to speed with Android Studio again. I barely got out of ‘Eclipse’ mode before I had to put this Android work away.


Database Statistics T-SQL Script

After recently completing a database development project I found the actual database tables in use had gotten out of step with my original (planned) Entity Relationship Model and its associated Data Schema. The reason for the differences in my data tables (from those which I had planned for) was due to the fact that when carrying out normalisation of the tables (in situ) in the database, duplicated tables (some containing additional fields) were included in order to accommodate additional information which had been stored in the original (Excel) data source. To check that all the tables in the database matched the original model (and also to target additional unused rows – for later removal) I used the following script. By executing the script in a query window in Microsoft SQL Server Management Studio (R2) a resulting Table and Column name listing was produced. This script was referenced on the ‘sqlauthority’ website listed below. However I made a slight modification (further sources are cited) in order to remove ‘auto created tables’ from the list in order to leave only tables that I had actually added to the database structure myself in the list. This allowed me to focus my attention on the tables which I had inserted from the outset (as distinct from system auto generated tables). I hope you find the following scripts useful. Whilst carrying out research for this work I stumbled on this excellent script source on the Simple Talk website. https://www.simple-talk.com/sql/database-administration/exploring-your-sql-server-databases-with-t-sql/ This source provides additional scripts for delving into all manner of database and table statistic in T-SQL. Its a post I will no doubt be returning to in the future.

This script produces a listing of all Tables and Table Objects within a T-SQL database, including: TableName, ColumnName, SchemaName, TypeName, StatName, column_id and LastUpdated date. Sample is listing is for the familiar ‘Northwind’ database. Of course you need to modify with your database name.

References: http://blog.sqlauthority.com/2011/06/29/sql-server-find-details-for-statistics-of-whole-database-dmv-t-sql-script/ http://stackoverflow.com/questions/2418527/sql-server-query-to-get-the-list-of-columns-in-a-table-along-with-data-types-no


The amazing em unit

We were discussing the ’em’ unit at work today (and font sizing on a web page in general as a matter of fact) and after a few minutes I realised that my knowledge of EMs and how to set up a consistent (site wide) font sizing scheme using Em’s (or percentage values for that matter) was a bit vague to say the least. It turns out (according to the article I found – and reproduced below) that Ems are your friend in so many other areas of web page layout too. It doesn’t quite get to the bottom of the page font sizing issue but nevertheless I found this discussion amazing (I hope you do too). The article wasn’t easy to find though, tucked away (as it was) in the archives of the http://www.w3.org website. Who knows what other treasures lie in store there?

EM Space Typography Museum

Image: cargocollective.com

The amazing em unit and other best practices [original article taken from http://www.w3.org/WAI/GL/css2em.htm]

This post is about writing style sheets with style. By showing you case studies and how they are constructed, we hope to give you a sense of how CSS can be used to encode the visual presentation you want to achieve. Also, more importantly, if you follow the guidelines in this chapter your documents will behave well on a wide range of web devices. For example, they will scale gracefully from one screen size to another.

Use ems to make scalable style sheets

The foremost tool for writing scalable style sheets is the “em” unit, and it therefore goes on top of the list of guidelines that we will compile throughout this chapter: use ems to make scalable style sheets. Named after the letter “M”, the em unit has a long-standing tradition in typography where it has been used to measure horizontal widths. For example, the long dash often found in American texts (–) is known as “em-dash” since it historically has had the same width as the letter “M”. Its narrower cousin (-), often found in European texts is similarly referred to as “en-dash”.

The meaning of “em” has changed over the years. Not all fonts have the letter “M” in them (for example Chinese), but all fonts have a height. The term has therefore come to mean the height of the font – not the width of the letter “M”.

In CSS, the em unit is a general unit for measuring lengths, for example page margins and padding around elements. You can use it both horizontally and vertically, and this shocks traditional typographers who always have used em exclusively for horizontal measurements. By extending the em unit to also work vertically, it has become a very powerful unit – so powerful that you seldom have to use other length units.

Let’s look at a simple example where we use the em unit to set font sizes:

Always use ems to set font sizes

When used to specify font sizes, the em unit refers to the font size of the parent element. So, in the example above, the font size of the h1 element is set to be two times the font size of the body element. In order to find what the font size of the h1 element will be, we need to know the font size of body . Since this isn’t specified in the the style sheet, the browser will have to find it from somewhere else – a good place to look is in the user’s preferences. So, if the user has set the normal font size to be 10 points, the size of the h1 element will be 20 points. This will make document headlines stand out relative to the the surrounding text. Therefore: always use ems to set font sizes. Designers who come from desktop publishing may be inclined to skip the indirection that em introduces and specify directly that the font size should be 20 points. This is possible in CSS (see the description of the font-size property) but using “em” is a better solution. Say, for example, that a sight-impaired user sets his normal font size to 20pt (20 points). If the font size of H1 is 2em – as we recommend – h1 elements will scale accordingly and be displayed in 40 points. If, however, the style sheet sets the font size to be 20pt , there will be no scaling of fonts and the size of headlines will have the same size as the surrounding text. The usefulness of the em unit isn’t limited to font sizes. Figure 1 shows a page design where all lengths – including the padding and margins around elements – are specified in ems. Let’s first consider the padding. In CSS, padding is space around an element which is added to set the element apart from the rest of the content. The color of the padding is always the same as the background color of the element is surrounds. In figure 1 , the menu on the right has been given a padding with this rule:

By specifying the padding width in ems, the width of the padding is relative to the font size of the div element. As a designer, you don’t really care what the exact width of the padding is on the user’s screen, what you care about is the proportions of the page you are composing. If the font size of an element increases, the padding around the element should also increase. This is shown in figure 2. where the font size of the menu has increased while the proportions remain constant. (You can learn more about padding in chapter 9 .) Outside the menu’s padding is the margin area. The margin area ensures that there is enough space around an element so that the page doesn’t appear cramped. The margin around the menu is set with this rule:

Figure 2. Identifies the margin area. Again, the use of ems ensures scalable designs.

Another use of ems can be found in this book where the indent of the first line of most paragraphs to is set to 1.8 em . The same value is used for the left margin of code examples, such as this:

So, if ems are so great, why does CSS have other units as well? There are cases when it makes sense to use other units. E.g. , here is a case where percentages may work just as well, if not better: setting the margins of the body element. Remember that everything that is displayed in an HTML page is inside body , so setting the margins of that element sets the overall shape of the page. You could give the page nice wide margins on both sides with these two rules:

This makes the text 75 % of the total width, and the left margin a bit wider than the right one. Try it! Your page immediately looks more professional. Percentage values set on the body element will typically be calculated with respect to the browser window. So, in the example above, the text will cover 75 % of the browser window.

Use relative units for lengths

Both ems and percentages are relative units – which means they are computed with respect to something. We can distill a general rule from this: use relative units for lengths. But, how about the absolute units in CSS – inches, centimeters, points, pica – why are they in there at all if you never recommend their use?

Only use absolute length units when the physical characteristics of the output medium are known.

There are cases when they should be used. Say, for example, that you are doing your wedding invitations using XML and CSS. You have carefully crafted tags such as ‘‘ and ‘‘ and you plan to distribute the invitations through the Web. However, parts of your families are not yet connected and require printed invitations. On handmade paper, of course. With proper margins. And 12-point fonts, exactly. This is the time for pulling out the obsolete, absolute length units (such as millimeters or points): only use absolute length units when the physical characteristics of the output medium are known. In practice, this only happens when you hand-tailor a style sheet for a specific printer paper size. In all other cases you are better off using relative length units.

[ You can find a basic guide to CSS unit here].

A common presentation on the Web is to move element to the sides of the page. Typically, this is achieved by using a table for layout purposes. Although you can use CSS to describe table layout (see chapter 12 ), there is also a simpler way to “put stuff on the side.” Floating elements slide over to the side of a page while allowing other content to “wrap around” it. The menu in figure 1 is an example of a floating element that has been set to float to the right side of the page. There are two steps to achieving this effect. First, the element must be declared to be floating using the float property. Second, the element must be prohibited from stretching out horizontally to fill the whole page. This is done through the width property. Here are the two rules needed:

Use floating elements instead of tables
By using floating text elements instead of tables, your markup can remain simple while achieving many of the visual effects which are often accomplished with tables in HTML. Thus, we have another guideline: use floating elements instead of tables . Simpler markup isn’t the only reason why floating elements are good replacement for tables. Flexible layout schemes is another. By changing a few lines in the style sheet which generated the page we can, for example move the menu to the left side. Also, many text-only browsers have problems displaying tables since content within the table doesn’t come in its logical order.
Put content in its logical order
This brings us to the next guideline: put content in its logical order . Even though CSS allows you to move text around on the screen by means of floats and other ways of positioning, you should not rely on that. By putting content in its logical order you ensure that you document will make sense in browsers which don’t support CSS. That includes browsers that work in text-mode, such as Lynx, older browsers, that date from before CSS, browsers whose users have turned style sheets off, or browsers that don’t work visually at all: voice browsers and Braille browsers. Voice browsers may actually support CSS, since CSS can also describe the style of spoken pages, but aural CSS (see chapter [??]) doesn’t allow text to be spoken out of order.
Make sure your documents are legible without style sheets
And even a browser that supports CSS may sometimes fail to load the style sheet, due to a network error. Therefore, you should always: make sure your documents are legible without style sheets . Legible to humans, but also to Web robots and other software, that tries to index, summarise, or translate your documents. And think of the future: in 5 years from now the style sheet may have gotten lost, in 50 years there may not be a browser that knows CSS anymore, and in 500 years?
Test your documents on several browsers
A good way to make sure your documents are really legible is to: test your documents on several browsers . Alas, not all browsers which claim to support CSS do so according to W3C’s specification. How much efforts you should put into testing you style sheets depends on the target audience of your documents. If you publish on a closed intranet where everyone uses the same browser, your testing job will be easy. If, on the other hand, your documents are openly available on the Web, testing can be a time-consuming task. One way to avoid doing all the testing yourself is to use one of the W3C Core Styles which are freely available on the Web (see chapter 19 ).
Always specify a fallback generic font
Realise that your document will end up on systems that have different fonts. CSS specifies five so-called generic fonts which are guaranteed to exist in all browsers: serif , sans-serif , monospace , cursive and fantasy . When specifying a font families in CSS you have the option of supplying a list to increase the chance of finding a specified font at the user’s system. The last font family in the list should always be a generic font. So: always specify a fallback generic font . This book, e.g. , has been set in “Gill Sans.” But not everybody has a copy of that font, so we actually specified the font as which says that the font for the document’s body is “Gill Sans” when available, or any other sans-serif font, when not. Depending on your browser and your machine’s configuration, you may get Helvetica, or Arial, or something similar. You can learn more about setting fonts in chapter 6 .
Use numbers, not names, for colors
Color names also vary from one platform to another. CSS supports 16 color names: aqua, black, blue, fuchsia, grey (or gray), green, lime, maroon, navy, olive, purple, red, silver, teal, yellow, white. Some browsers have chosen to support additional color names, but there is no definite list. Therefore, you should: use numbers, not names, for colors. Color names may seem friendlier than the somewhat cryptic RGB notation introduced in the previous chapter, but the Web has yet to see the ultimate list of color names that work on all platforms. Color numbers, on the other hand, can easily be interpreted by any browser. You may have to experiment a bit, to get the exact color you want, or find some software that helps you mix the right colors. CSS supports the hexadecimal notation (“#FF0000” and “#F00”) and also some other notations that may be easier to use. The following two rules both set the color of h1 elements to brown (50% red, 50% green, 0% blue): You can learn all about colors in chapter 13. (Reader: please refer to the web site link at the top of this post)
Know when to stop!
A word of warning at the end: know when to stop. Be critical when designing your style sheet. Just because you can use 10 different fonts and 30 different colors on the same page doesn’t mean you have to – or should. Simple style sheets often will convey your message better than overloaded ones. That single word of red in a page of black gets much more attention then any of the words on a page with a dozen different fonts and colors. If you think a piece of your text deserves more attention, try giving it larger margins, maybe even on all on all four sides. A little extra space can do wonders.

Footnote: Here’s an article by Richard Rutter on one method to use for defining a font scheme for a website.

The advice in this article has served me well for several years now: “How to size text using ems”.


Microsoft Web Development Technologies – A Refresher

Reader, as I’m soon to be making the move to Visual Studio 2013, I thought I would brush up on some of the newer (and not so new) Microsoft stable of products and web development methods. I assembled the list below from many online sources, not least the horses mouth itself Microsoft.com. I hope you find the list useful. Please get in touch or add a comment for any of those I’ve missed (there are sure to be a whole host of those).
Term Description
.Net Framework A programming infrastructure created by Microsoft for building, deploying and running applications and services that use .NET technologies, such as desktop applications and Web services. The .NET Framework contains three major parts:
  • the Common Language Runtime
  • the Framework Class Library
  • ASP.NET
Agile software development is a group of software development methods based on iterative and incremental development, where requirements and solutions evolve through collaboration between self-organizing, cross-functional teams. It promotes adaptive planning, evolutionary development and delivery, a time-boxed iterative approach, and encourages rapid and flexible response to change. It is a conceptual framework that promotes foreseen tight interactions throughout the development cycle.
AJAX Short for Asynchronous JavaScript and XML, it is a term that describes a new approach to using a number of existing technologies together, including the following: HTML or XHTML, Cascading Style Sheets, JavaScript, the Document Object Model, XML, XSLT, and the XMLHttpRequest object. When these technologies are combined in the Ajax model, Web applications are able to make quick, incremental updates to the user interface without reloading the entire browser page.
ADO.NET ADO.NET is the data access component for the .NET Framework. ADO.NET is entirely based on XML and it leverages the power of XML to provide disconnected access to data. ADO.NET is made of a set of classes that are used for connecting to a database, providing access to relational data, XML, application data and retrieving results. ADO.NET is made of a set of classes that are used for connecting to a database, providing access to relational data, XML, application data, and retrieving results. ADO.NET has, unlike ADO, no Recordset object
ASP.NET A Microsoft server-side Web technology. ASP.NET takes an object-oriented programming approach to Web page execution. Every element in an ASP.NET page is treated as an object and run on the server. An ASP.NET page gets compiled into an intermediate language by a .NET Common Language Runtime-compliant compiler. Then a JIT compiler turns the intermediate code to native machine code, and that machine code is eventually run on the processor. Because the code is run straight from the processor, pages load much faster than classic ASP pages, where embedded VBScript or JScript had to be continuously interpreted and cached.
C# A hybrid of C and C++, it is a Microsoft programming language developed to compete with Sun’s Java language. C# is an object-oriented programming language used with XML-based Web services on the .NET platform and designed for improving productivity in the development of Web applications. C# boasts type-safety, garbage collection, simplified type declarations, versioning and scalability support, and other features that make developing solutions faster and easier, especially for COM+ and Web services.
Content Page In Web site development with ASP.NET,  the Content Page is a page that is usually associated with a Master Page. A Content Page will contain text (of course), HTML, and controls within tags. When the Content page is requested (by a visitor to the website) it’s content will be combined with a copy of the master page and its content will be placed within a placeholder. In this way a Master and Content page will provide a consistent framework in which to hold content.
Design patterns A design pattern in architecture and computer science is a formal way of documenting a solution to a design problem in a particular field of expertise. The idea was introduced by the architect Christopher Alexander in the field of architecture and has been adapted for various other disciplines, including computer science. An organized collection of design patterns that relate to a particular field is called a pattern language. The elements of this language are entities called patterns. Each pattern describes a problem that occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice. – The usefulness of speaking of patterns is to have a common terminology for discussing the situations designers already see over and over.
DTD A document type definition (DTD) is a set of markup declarations that define a document type for an SGML-family markup language (SGML, XML, HTML). A DTD uses a terse formal syntax that declares precisely which elements and references may appear where in the document of the particular type, and what the elements’ contents and attributes are. A DTD can also declare entities that may be used in the instance document. XML uses a subset of SGML DTD. A DTD is associated with an XML or SGML document by means of a document type declaration (DOCTYPE). The DOCTYPE appears in the syntactic fragment doctypedecl near the start of an XML document. The declaration establishes that the document is an instance of the type defined by the referenced DTD. DTDs make two sorts of declaration:
  • an optional external subset
  • an optional internal subset
Microsoft Dynamics CRM Microsoft Dynamics CRM is a customer relationship management software package developed by Microsoft. Out of the box, the product focuses mainly on Sales, Marketing, and Service (help desk) sectors, but Microsoft has been marketing Dynamics CRM as an XRM platform and has been encouraging partners to use its proprietary (.NET based) framework to customize it to meet many different demands. The Microsoft Dynamics family of business applications includes other related products such as Microsoft Dynamics AX (ERP application), Microsoft Dynamics GP, (ERP application) Microsoft Dynamics NAV (ERP application), and Microsoft Dynamics SL (ERP Application) and also Microsoft Dynamics Retail Management System; also known as Dynamics RMS.Dynamics CRM is a server-client application, which, like Microsoft SharePoint, is primarily an IIS-based web application which also supports extensive web services interfaces. Clients access Dynamics CRM either by using a Browser or by a thick client plug-in to Microsoft Outlook. Beside the Microsoft Internet Explorer the Chrome and Firefox browsers are fully supported since Microsoft Dynamics CRM 2011 Update Rollup.
HTML5 HTML5 is a W3C specification that defines the fifth major revision of the Hypertext Markup Language (HTML – created in 1990 and standardized as HTML 4 as of 1997). One of the major changes in HTML5 is in respect to how HTML addresses Web applications. HTML5 is a markup language used for structuring and presenting content for the World Wide Web and it is a core technology of the Internet. HTML5 core aims are; to improve the language with support for the latest multimedia while keeping it easily readable by humans and consistently understood by computers and devices (web browsers, parsers, etc.). HTML5 is intended to include (and to extend) the HTML 4 attempt to define a single markup language that can be written in either HTML or XHTML syntax. HTML5 includes detailed processing models to encourage more interoperable implementations; it extends, improves and rationalises the markup available for documents, and introduces markup and application programming interfaces (APIs) for complex web applications. New syntactic features include the <video>, <audio> and <canvas> elements, as well as the integration of scalable vector graphics (SVG) content (that replaces the uses of generic <object> tags
Indigo Indigo, part of Microsoft’s Windows operating system code-named Longhorn, unifies a variety of Microsoft technologies (COM+, MSMQ, ASP.NET Web services [ASMX], Remoting) and transports (HTTP, TCP, UDP, IPC) to create a single framework and runtime environment for building distributed systems.
LINQ Short for Language INtegrated Query, LINQ is set of classes added to the .NET Framework 3.5 along with language enhancements added to C# 3.0 and Visual Basic 9, the versions of the language that ship with Visual Studio 2008. LINQ adds a rich, standardized query syntax as a first-class citizen in .NET programming languages that allows developers to interact with any type of data.
MS Test MSTest.exe is a component in Visual Studio. MSTest is a command line utility from Microsoft that executes unit tests created in Visual Studio 2005, 2008, 2010 and is still available for backwards compatibility with older versions in Visual Studio 2012 and 2013. Microsoft recommends running the tests in VSTest.Console in later versions. MSTest is not the Visual Studio Unit Testing Framework defined in the Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll dynamic link library (DLL). MSTest is executed as a command-line command that is used to run unit tests. It has several options that you can use to customize your test run. You can use many of these options in conjunction with one another; in fact, you must use certain options in conjunction with other options, as described in the following sections. You can specify these options in any order on the MSTest.exe command line. MSTest.exe does not interpret the options or the values you specify for them in a case-sensitive manner.
MVC Abbreviated as MVC, Model-View-Controller is the term used to describe a software paradigm that separates objects into one of three categories:
  • models for maintaining data
  • views for displaying all or a portion of the data
  • controllers for handling events that affect the model or views.
  • In this separation, the view and controller depend on the model. However, the model does not depend on either of the two making it so the model can be built and tested independent of the visual presentation.
NUnit NUnit is an open source unit testing framework for Microsoft .NET. It serves the same purpose as JUnit does in the Java world, and is one of many progr FireBenchmarks is an addin able to record execution time of unit tests and generate XML, CSV, XHTML performances reports with charts and history tracking. Its main purpose is to enable a developer or a team that work with an agile methodology to integrate performance metrics and analysis into the unit testing environment, to easily control and monitor the evolution of a software system in terms of algorithmic complexity and system resources load. NUnit.Forms is an expansion to the core NUnit framework and is also open source. It specifically looks at expanding NUnit to be able to handle testing user interface elements in Windows Forms. As of January 2013, Nunit.Forms is in Alpha release, and no versions have been released since May 2006.
OAuth OAuth is an open standard for authorization. OAuth provides a method for clients to access server resources on behalf of a resource owner (such as a different client or an end-user). It also provides a process for end-users to authorize third-party access to their server resources without sharing their credentials (typically, a username and password pair), using user-agent redirections. OAuth is a service that is complementary to, and therefore distinct from, OpenID. OAuth is also distinct from OATH, which is a reference architecture for authentication (i.e. not a standard).
OData OData is a standardized protocol for creating and consuming data APIs. OData builds on core protocols like HTTP and commonly accepted methodologies like REST. The result is a uniform way to expose full-featured data APIs.
Razor Razor is a markup syntax for adding server-based code to web pages. It has the power of traditional ASP.NET markup, but is easier to learn, and easier to use. Razor is a server side markup syntax much like ASP and PHP and it supports the C# and Visual Basic programming languages when used in conjunction with ASP.NET.
SharePoint Microsoft SharePoint is a Web application platform developed by Microsoft. First launched in 2001, SharePoint has historically been associated with intranet, content management and document management, but recent versions have significantly broader capabilities.
Silverlight A Web-based digital video technology by Microsoft, codename “WPF/E”.  Silverlight is a cross-browser, cross-platform plug-in for delivering media and rich interactive applications for the Web. The Silverlight browser plug-in is freely available for all major browsers including Mozilla Firefox, Apple’a Safari and Windows Internet Explorer running on the Macintosh or Microsoft Windows. http://www.webopedia.com/TERM/S/Silverlight.html
SQL Profiler SQL profiler (or SQL Server profiler.) is a graphical user interface (GUI) software tool in Microsoft’s SQL Server relational database management system (RDBMS). It monitors, analyzes, troubleshoots and tunes SQL databases and their environment. Database monitoring, which, arguably, is the most widely-used and important RDBMS function, is performed by generating customized monitoring instances of specific database portions, also known as trace logs. SQL Profiler may be used to capture data for real-time or future review. In addition, traces may be scheduled to run at specific times. For example, to compare performance when the database is busy or idle, one trace may be set up to run in the morning at 10 a.m. when the database is busiest, and another set up to run at 2 a.m. when there is little or no database activity.
SSIS SQL Server Integration Services (SSIS) is a component of the Microsoft SQL Server database software that can be used to perform a broad range of data migration tasks. SSIS is a platform for data integration and workflow applications. It features a fast and flexible data warehousing tool used for data extraction, transformation, and loading (ETL). The tool may also be used to automate maintenance of SQL Server databases and updates to multidimensional cube data. First released with Microsoft SQL Server 2005, SSIS replaced Data Transformation Services, which had been a feature of SQL Server since Version 7.0. Unlike DTS, which was included in all versions, SSIS is only available in the “Standard” and “Enterprise” editions.
SSRS SQL Server Reporting Services (SSRS) is a server-based report generation software system from Microsoft. It is part of suite of Microsoft SQL Server services, including SSAS (SQL Server Analysis Services) and SSIS (SQL Server Integration Services). While SSAS enables users to construct special databases for fast analysis of very large amounts of data, and while SSIS enables users to integrate data from many sources outside Microsoft SQL Server databases, SSRS enables users to quickly and easily generate reports from Microsoft SQL Server databases. The SSRS service provides a unique interface into Microsoft Visual Studio so that developers as well as SQL administrators can connect to SQL databases and use SSRS tools to format SQL reports in many complex ways. SSRS also provides a ‘Report Builder’ tool for less technical IT workers to format SQL reports of lesser complexity. Administered via a web interface, it can be used to prepare and deliver a variety of interactive and printed reports. SSRS competes with Crystal Reports and other business intelligence tools.
TFS Team Foundation Server (commonly abbreviated to TFS) is a Microsoft product which provides source code management (either via Team Foundation Version Control or Git), reporting, requirements management, project management (for both agile software development and waterfall teams), automated builds, lab management, testing and release management capabilities. It covers the entire Application Lifecycle Management. TFS can be used as a back end to numerous integrated development environments but is designed to provide the most benefit by serving as the back end to Microsoft Visual Studio or Eclipse (on Windows and non-Windows platforms).
T-SQL Short for Transaction-SQL, an extended form of SQL that adds declared variables, transaction control, error and exception handling and row processing to SQL’s existing functions.
UI tests In software engineering, graphical user interface testing is the process of testing a product’s graphical user interface to ensure it meets its written specifications. This is normally done through the use of a variety of test cases.  Test Case Generation – To generate a set of test cases, test designers must be certain that their suite covers all the functionality of the system and also has to be sure that the suite fully exercises the GUI itself. The difficulty in accomplishing this task is twofold: to deal with domain size and with sequences. In addition, the tester faces more difficulty when they have to do regression testing.
Unit Testing Framework The Unit Testing Framework supports unit testing in Visual Studio. Use the classes and members in the Microsoft.VisualStudio.TestTools.UnitTesting namespace when you are coding unit tests. You can use them when you have written the unit test from scratch or are refining a unit test that was generated from code you are testing. Groups of Elements – To help provide a clearer overview of the Unit Testing Framework, this section organises the elements of the UnitTesting namespace into groups of related functionality. Note that Attribute elements – Whose names conclude with the string Attribute, can be used either with or without the string Attribute. For example, the following two code examples function identically:- [TestClass()] & [TestClassAttribute()]. Elements Used for Data-Driven Testing. Use the following elements to set up data-driven unit tests. Configure a Data-Driven Unit Test: 
  • DataAccessMethod
  • DataSourceAttribute
  • DataSourceElement
  • DataSourceElementCollection
Unit Tests In computer programming, unit testing is a method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures are tested to determine if they are fit for use. Intuitively, one can view a unit as the smallest testable part of an application. In procedural programming, a unit could be an entire module, but is more commonly an individual function or procedure. In object-oriented programming, a unit is often an entire interface, such as a class, but could be an individual method. Unit tests are short code fragments created by programmers or occasionally by white box testers during the development process. Ideally, each test case is independent from the others. Substitutes such as method stubs, mock objects, fakes, and test harnesses can be used to assist testing a module in isolation. Unit tests are typically written and run by software developers to ensure that code meets its design and behaves as intended.
WCF The Windows Communication Foundation (or WCF), previously known as “Indigo”, is a runtime and a set of APIs (application programming interface) in the .NET Framework for building connected, service-oriented applications. WCF is a tool often used to implement and deploy a service-oriented architecture (SOA). It is designed using service-oriented architecture principles to support distributed computing where services have remote consumers. Clients can consume multiple services; services can be consumed by multiple clients. Services are loosely coupled to each other. Services typically have a WSDL interface (Web Services Description Language) that any WCF client can use to consume the service, regardless of which platform the service is hosted on. WCF implements many advanced Web services (WS) standards such as WS-Addressing, WS-ReliableMessaging and WS-Security. With the release of .NET Framework 4.0, WCF also provides RSS Syndication Services, WS-Discovery, routing and better support for REST services.
Web Services The fundamental concept of web services is powerful and continues to evolve and advance. The original SOAP (Simple Object Access Protocol) standard is the use of the HTTP protocol to pass XML-formatted data to the server from a client and receive XML-formatted results in return. This can be from within a web browser using the XmlHttpRequest object or directly from a desktop application or another server. Before web services became widely adopted, it was not uncommon for developers to programmatically request a page as an HTML document and extract the desired data from it, a technique known as screen-scraping. This causes all sorts of frustrations as sites are continually updated and the screen-scraping clients must try to keep up by modifying their parsing code to adapt to the new HTML the target site is rendering.
WF Windows Workflow Foundation (WF) is a Microsoft technology that provides an API, an in-process workflow engine, and a rehostable designer to implement long-running processes as workflows within .NET applications. The current version of WF is WF4. An example of WWF usage with ASP.NET goes as follows: A Microsoft ASP.NET application that displays pages to its users might use a workflow to control the order in which those pages are shown. Doing this can make it easier to change the page flow without changing the pages themselves, as well as cleanly separating the application’s user interface from its controlling logic. A workflow, as defined here, is a series of distinct programming steps or phases. Each step is modeled in WF as an Activity. The .NET Framework provides a library of activities (such as WriteLine, an activity that writes text to the console or other form of output). Custom activities can also be developed for additional functionality. Activities can be assembled visually into workflows using the Workflow Designer, a design surface that runs within Visual Studio. The designer can also be hosted in other applications. Encapsulating programming functionality into activities allows the developer to create more manageable applications; each component of execution can be developed as a Common Language Runtime object whose execution will be managed by the workflow runtime. The workflow engine provides the following features. Scheduling and executing workflows and activities. Workflows can be executed using one of three methods: Using WorkflowInvoker, which executes workflows on the calling thread (that is, a new thread is not created for the workflow). This means that the calling process will wait for the workflow to complete.
Windows Azure Windows Azure is a cloud computing platform and infrastructure, created by Microsoft, for building, deploying and managing applications and services through a global network of Microsoft-managed datacenters. It provides both PaaS and IaaS services and supports many different programming languages, tools and frameworks, including both Microsoft-specific and third-party software and systems. Windows Azure was released on February 1, 2010 Websites allows developers to build sites using ASP.NET, PHP, or Node.js and can be deployed using FTP, Git, Mercurial or Team Foundation Server. Virtual machines let developers migrate applications and infrastructure without changing existing code, and can run both Windows Server and Linux virtual machines. Cloud services – Microsoft’s Platform as a Service (PaaS) environment that is used to create scalable applications and services. Supports multi-tier scenarios and automated deployments. Data management – SQL Database, formerly known as SQL Azure Database, works to create, scale and extend applications into the cloud using Microsoft SQL Server technology. Integrates with Active Directory and Microsoft System Center and Hadoop. Media services – A PaaS offering that can be used for encoding, content protection, streaming, and/or analytics.
WPF Windows Presentation Foundation (or WPF) is a graphical subsystem for rendering user interfaces in Windows-based applications by Microsoft. WPF, previously known as “Avalon”, was initially released as part of .NET Framework 3.0. Rather than relying on the older GDI subsystem, WPF uses DirectX. WPF attempts to provide a consistent programming model for building applications and separates the user interface from business logic. It resembles similar XML-oriented object models, such as those implemented in XUL and SVG.  WPF employs XAML, an XML-based language, to define and link various UI elements. WPF applications can also be deployed as standalone desktop programs, or hosted as an embedded object in a website. WPF aims to unify a number of common user interface elements, such as 2D/3D rendering, fixed and adaptive documents, typography, vector graphics, runtime animation, and pre-rendered media. These elements can then be linked and manipulated based on various events, user interactions, and data bindings.
Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable (please see the entry on XPath below). It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all free open standards. The design goals of XML emphasize simplicity, generality, and usability over the Internet. It is a textual data format with strong support via Unicode for the languages of the world. Although the design of XML focuses on documents, it is widely used for the representation of arbitrary data structures, for example in web services. Many application programming interfaces (APIs) have been developed to aid software developers with processing XML data, and several schema systems exist to aid in the definition of XML-based languages.  As of 2009, hundreds of document formats using XML syntax have been developed, including RSS, Atom, SOAP, and XHTML.
SGML The Standard Generalized Markup Language (SGML; ISO 8879:1986) is an ISO-standard technology for defining generalized markup languages for documents. ISO 8879 Annex A.1 defines generalized markup: Generalized markup is based on two novel postulates: Markup should be declarative: it should describe a document’s structure and other attributes, rather than specify the processing to be performed on it. Declarative markup is less likely to conflict with unforeseen future processing needs and techniques. Markup should be rigorous so that the techniques available for processing rigorously-defined objects like programs and databases can be used for processing documents as well.
Web Services The fundamental concept of web services is powerful and continues to evolve and advance. The original SOAP (Simple Object Access Protocol) standard is the use of the HTTP protocol to pass XML-formatted data to the server from a client and receive XML-formatted results in return. This can be from within a web browser using the XmlHttpRequest object or directly from a desktop application or another server. Before web services became widely adopted, it was not uncommon for developers to programmatically request a page as an HTML document and extract the desired data from it, a technique known as screen-scraping. This causes all sorts of frustrations as sites are continually updated and the screen-scraping clients must try to keep up by modifying their parsing code to adapt to the new HTML the target site is rendering.
XPath XPath is a syntax for defining parts of an XML document. It uses path expressions to navigate in XML documents and it contains a library of standard functions. – XPath is a major element in XSLT and is a W3C recommendation. The XML Path Language, is a query language for selecting nodes from an XML document. In addition, XPath may be used to compute values (e.g., strings, numbers, or Boolean values) from the content of an XML document. The XPath language is based on a tree representation of the XML document, and provides the ability to navigate around the tree, selecting nodes by a variety of criteria. XPath uses path expressions to select nodes or node-sets in an XML document. These path expressions look very much like the expressions you see when you work with a traditional computer file system. XPath includes over 100 built-in functions. There are functions for string values, numeric values, date and time comparison, node and QName manipulation, sequence manipulation, Boolean values, and more. – Without XPath knowledge you will not be able to create XSLT documents. XQuery and XPointer are both built on XPath expressions. XQuery 1.0 and XPath 2.0 share the same data model and support the same functions and operators.
XSLT XSL stands for EXtensible Stylesheet Language, and is a style sheet language for XML documents. XSLT stands for XSL Transformations. XSLT includes over 100 built-in functions. There are functions for string values, numeric values, date and time comparison, node and QName manipulation, sequence manipulation, Boolean values, and more.

Copy and Rename of C# .NET Visual Studio projects

I had to rename a Visual Studio Project recently. This wasn’t as straightforward as I thought it would be. After a first failed attempt I decided to hit the usual favourite forums. (I had done a project rename successfully years ago but had long since forgotten what I did on that occasion)… so studying a few articles on the subject here’s one method I came up with which you can use if you so wish. I consulted two existing articles on this topic [references below] prior to assembling this list. These were for Visual Basic projects. So this is my take on the procedure for C# (I hope it’s of some use to you reader) – The steps are very similar: 1. Close all Visual Studio Projects. 2. Make a copy of the original project and store elsewhere (in case of problems). 3. Use the copied folder as the new source folder. Below this source folder will be the ‘tree’ of associated folders (i.e. your project sub-folders) 4. Assuming the project is called ‘OldProject’ the following file/folder structure should be in place:
Rename the above folders to your new chosen name (as shown below). You can safely do this without damaging the project (besides you will have your backup stored of course!)
8. Open the new root sub-folder and rename the ‘OldProject.csproj’ file within it to ‘NewProject.csproj’ 9. Open Visual Studio 10. Select the File| Open Project… menu option and in the dialog presented search for and select the new solution (.sln) file. 11. The following error message will be given: 12. Just ignore this message and Click [OK] to Proceed 13. When the Project opens, Right-Click on the Project in the Solutions Explorer, and select 14. Again, Right-Click in the Solutions Explorer, and select Add | Existing project… 15. Point to, and open, the new .vbproj file in the (new) app (root)\(sub) folder. The project should now load correctly. However the project files will still retain references to the OldProject string. Using Edit | Find and Replace | Replace in Files, replace all references to ‘Oldproject’ with ‘NewProject’. In my case there were 29 files with replaced strings. (note: prior to this step you may consider backing up the project once again as a precaution in case of problems in the following steps) 16. Next, Right-Click the project root folder and select the last item on the list ‘Properties’. In the field placeholders shown for “Assembly name:” and Default namespace:”, enter the new project name. Then click File | Save All. 17. Use ‘Build | Rebuild’ to rebuild the project with the changed name. Assuming the old Project was able to compile, the new Project should also compile and create the associated build files. 18. Try out the newly named project using the usual ‘Run’ menu option (or Ctrl F5 keys). The newly named project should run as expected. There is one further additional step (for clean up of the old project files (if required)). In my case I found this wasn’t necessary. 19. Close the application and Visual Studio. Navigate to the folder .\NewProject\NewProject\obj\Debug and delete any files with the old project name. Note: The .sln file contains the reference to the .vbproj file, so you may need to open it (in notepad) and change the header information that reads: Just replace all the instances of ‘OldProject’ with ‘NewProject’ Google

Update from Drupal to WordPress CMS

I’ve just updated this website from the ‘Drupal’ Content Management System (Version 6) to the latest ‘WordPress’ Engine, version 3.51. I did this by using the excellent post on the subject found on the socialcmsbuzz.com website. So, many thanks to ‘Lincoln’ for a very informative article which made the upgrade very easy to do – just by following the (well thought through) steps listed and executing a few SQL scripts. In the meantime this is a general advisory/warning that this site may have missing images, documents and links over the next few days.
Drupal to WordPress convert
Converting a Drupal Site to WordPress
Google-Plus

Android SDK Error: Unable to resolve target ‘android-X’ + a lookup table

I’m just dabbling with developing mobile phone applications (in this case ‘Android’) using the ‘Eclipse’ development environment (http://www.eclipse.org/platform).On loading new sample projects I’m getting Software Development Kit errors quite often. So, I have provided below (for myself, and anyone who is having similar problems) the relevant platform versions to install, based on the error received: For Example, you are presented with the error: “Android SDK Error: Unable to resolve target ‘android-10′” This is caused simply because the Eclipse IDE could not find the proper Android SDK version in your build environment. Assuming that the android Software Development Kit is installed correctly, then the problem is simply that the platform SDK requested by the “default.properties” is not installed. Heres the list of relevant ‘fixes’.
  • Unable to resolve target ‘android-1’ – change properties to Android 1.0
  • Unable to resolve target ‘android-2’ – change properties to Android 1.1
  • Unable to resolve target ‘android-3’ – install SDK Platform Android 1.5
  • Unable to resolve target ‘android-4’ – install SDK Platform Android 1.6
  • Unable to resolve target ‘android-5’ – install SDK Platform Android 2.0
  • Unable to resolve target ‘android-6’ – install SDK Platform Android 2.0.1
  • Unable to resolve target ‘android-7’ – install SDK Platform Android 2.1
  • Unable to resolve target ‘android-8’ – install SDK Platform Android 2.2
  • Unable to resolve target ‘android-9’ – install SDK Platform Android 2.3
  • Unable to resolve target ‘android-10’- install SDK Platform Android 2.3.3
  • Unable to resolve target ‘android-11’- install SDK Platform Android 3.0
  • Unable to resolve target ‘android-12’- install SDK Platform Android 3.1
  • Unable to resolve target ‘android-13’- install SDK Platform Android 3.2
  • Unable to resolve target ‘android-14’- install SDK Platform Android 4.0
  • Unable to resolve target ‘android-15’- install SDK Platform Android 4.0.3
You can do this using the Android SDK Setup utility: Option 1: open Eclipse | “Windows” | “Android SDK Manager | Add to the Available packages using the online links Option 2: using command line tools – start the “SDK Setup” here (x86): Hope the above helps resolve your build problem. You’ll no doubt have a few more along the way! Credit:Thanks to a post on http://sagistech.blogspot.com for the original information
Google

Deploying Blackberry Applications from a website – source code improvement available for download

So, you’ve built your web icon or application (perhaps in the ‘Eclipse’ development environment) and you have tested it thoroughly on your virtual platform and phone. The next step is perhaps allowing people to load your work directly onto their phone from your web site. I’ve just done this by using the following reference document on the Blackberry website: BlackBerry_Application_Web_Loader_Developer_Guide.pdf
BlackBerry_Phone_icon
The main steps are listed below, but I wouldn’t want to repeat the whole procedure here, so you’d best download the document if you havent already…

Enable the application web loader on a web server

The upshot is that the “web page template” provided is a bit basic to say the least and has a number of drawbacks for a cut and paste job (can be useful in many circumstances when you’re in a hurry, Ive found). Without going into too much detail the drawbacks are an incorrect doc type which renders the page in quirks mode. The style information included also doesn’t seem to match the tags within the document, so the styling is almost none existent!

Well, to get to the point, for those of you who have yet to handle this deployment page, I’ve attached a revised and updated fully styled version of the deployment page below. A second concern which struck me was the lack of the ‘AxLoader.cab’ file reference in a further sub-section of the source document cited above. The section begins…

Transfer the .cab, .jad, and .cod files to a web server

…. and I’m thinking what ‘AxLoader.cab’ file? It seemed to be missing from the “Blackberry Application Web Loader” download. But it was there, buried in with the .pdf install. The path should be something like: ‘C:\Program Files\Research In Motion\BlackBerry Application Web Loader 1.1.0″‘. It certainly stumped me for a while, and my searches on the forums and RIM site didn’t reveal any further information. Anyway, I hope the HTML and CSS (attachment below) is of use to you developer! Its not perfect but its an improvement on the default ‘look and feel’ provided.

BlackberryWebDeploy-CodeImprovement

Google


Eclipse IDE – Virtual Machine start problem, solved on second attempt

I installed the recent (1.6) version of the Java development kit to use in the Eclipse IDE. All was going well with the project until I opened the Eclipse environment yesterday and suddenly for no apparent reason it wouldn’t start! An error dialog was given stating: “Failed to create the Java virtual machine.”
eclipse-jvm_error_dialog
I’m pretty new to the Eclipse environment so this was quite a shock to me when it happened. My first thought that my multiple installations of Eclipse in parallel directories was the culprit, but this proved to be a wrong guess! (note to self: “get rid of those additional ‘Eclipse’ installs…. but hang on a minute, will they in fact be needed (one for my Blackberry trials and one for my Android work). Yes, I’m inexperienced in this area, so I’d best get back to the forums on this one… Anyway, checking the current problem in the forums on-line I found 2 possible fixes listed. Only after the second fix was the problem resolved. Here are the steps I carried out to resolve the problem: 1. Configure ‘Eclipse’ to start with java.exe or javaw.exe file (instead of the default jvm.dll startup file). To do this, open the eclipse.ini file (found in the directory on C drive where you installed the ‘Eclipse’ product. In my case this was simple C:\Eclipse). At the appropriate place add the sting ” -vm “ followed with a full path to javaw.exe* on the next line. Note: This didn’t solve the problem, but seems to have done so for many of the reported problem fixes. On further searching I found this second fix. 2. Once again open the eclipse.ini file and locate the default settings line “–launcher.XXMaxPermSize” which is set to a default value of 256m. By removing this value from the file and on saving the ini file, I find that Eclipse operates correcly and “all is well with the machine”. So let me get back to my latest android application (well actually its my first stab at android, I’ve only built for blackberry mobile phones up until now. As a reference for anyone needing the above tips here’s my current C:\Eclipse\eclipse.ini file listing in full:
Google

“Bookmark All Tabs” menu item missing in Firefox – solved

A very simple Firefox browser problem which had me stumped for quite a while! Turns out this has been around since Firefox 4 was released way back in March 2011. — I often want to check all the pages in a website for visual glitches on different platforms. I’ll sometimes want to check for display problems (on web pages across an entire website) which have crept in due changes in DOM handling on new browser releases. To open ‘bulk’ pages like this is simply achieved (of course) by opening all the (pre-saved) pages at once using a ‘Bookmarks Folder’. This saves having to ‘go in’ and open every page which needs checking when carrying out a websites’ ‘bi-annual MOT’ test :-). By saving a bookmarks folder of the entire site, the operation of web site (rendering) checking is greatly speeded up. So, I am using the recently installed Firefox 6.0.2. I select the ‘Bookmarks’ menu and there is no ‘Bookmark All’ option displayed. This seems strange! I’m thinking this particular browser version is broken or I have too many bookmarks saved perhaps… A quick search engine search revealed the simple fix for this. Solution: To access the “Bookmark All Tabs…” menu item I just had to right-click on any of the open tabs in the current browser session. Better still I could have used the keyboard shortcut Control+Shift+D . Footnotes: 1. This feature to ‘include all tabs’ is included in Internet Explorer 7 and 8. Here I either click on the Favorites menu (or press Alt+A to display it) and then find the “Add Current Tabs to Favorites” option. This is where I expected it to be. 2. The plot thickens in the Opera browser which has a great additional feature. If I click on the ‘Bookmarks Panel’ in Opera I can then Right click on the folder of my choice. From the menu which is revealed I can then “Bookmark All Open Pages”. A very nifty alternative when needing to save multiple tabs.