Showing posts with label CSS. Show all posts
Showing posts with label CSS. Show all posts

Saturday, August 18, 2012

Palette with Variables expanded by CSS


Potentially simplifying the work for Web designers, the working group behind the Cascading Style Sheets (CSS) Web standard is extending the language so that it supports the ability to define and call variables.



Tab Atkins, a Google developer who is on the working group has been taking suggestions this week as to what may be the best approach to represent variables in CSS.

As its name indicates, CSS is a stylesheet language, one that defines for a browser how a Web page, Web presentation or some other form of electronic content should be formatted. CSS offers a set of keywords to specify stylistic elements in a page layout, such as the font and spacing of text, and the color of the background. CSS can be embedded in the HTML page itself, either in the header or in the body. Or CSS code can be a separate file on the server, which is then referenced by the page.

To date, CSS has not yet offered a way for designers to define their own properties. Users have asked for this feature at least since the language's launch in 1998, according to CSS Working Group co-chair Daniel Glazman. Although the CSS Working Group uses the name "variables" to define this new feature, CSS variables would not have the full scope of the variable primitive found in most languages, Glazman explained. But it would allow designers to define the properties they use on a regular basis.

Nonetheless, such a naming capability would be handy, according to a draft document proposing the addition. It can cut down the amount of copying and pasting a designer must do to update a large Web site, for instance. If an organization has a standard set of colors and fonts to use across a Web site, CSS variables would allow these unique properties to be named by the designer. Then, when a stylistic change needs to be made, the designer simply reassigns the new values to the variables, eliminating the error-prone task of updating that information in each separate stylesheet and Web page.

The CSS working group is still trying to determine how the variables should best be represented in CSS. The designers favor declaring by using a reserved keyword, "var," in front of a new variable, so a new variable would be fined as var-NewVariable. But some users have expressed an interest in a specific key to define a variable, such as the "$" symbol, as in $NewVariable. Atkins cautioned against this approach as it limits the use of "$" for other variable activities, however.

While such matters may seem trivial, those who use a programming or markup language on a daily basis would benefit from the language being as consistent, and predictable, as possible. For instance, PHP has been roundly criticized for having an inconsistent syntax. Because PHP function names vary from one to the next in how they are formatted -- sometimes they have underscores and sometimes they don't -- programmers have more difficulty remembering or guessing the names of PHP functions, forcing them to consult documentation.

Friday, July 20, 2012

Napa: new programming model for Office 15


As part of its recent announcement of the new version of Office, Microsoft has introduced a new programming model for developing add-ins that combines web technologies and cloud services. The new model is designed to work with future versions of the Office productivity suite and with the SharePoint portal technology. The "Office 365 Development Tools" – code-named "Napa" – currently have "public preview" status and include a model for developing hosted apps that can, Microsoft says, be operated via SharePoint, Windows Azure and custom web servers. Developers will be able to market their apps and add-ins through the new Microsoft Store, as well as through their own companies' app catalogues.



Napa is available as a free development environment for SharePoint and is also referred to as the "online companion to Visual Studio", Microsoft's IDE. As it integrates into a browser, no further desktop installations appear to be required and developers can work directly in the browser. Supported formats include HTML, client-side ASP.NET (ASPX), CSS and JavaScript. Switching to the forthcoming Visual Studio 2012 is only required for more ambitious scenarios. Microsoft says that existing Office and SharePoint extension models such as VBA, COM, VSTO and SharePoint Solutions will work in parallel with Napa, although these models are unlikely to be available to install via the online store.

To start experimenting with Napa, developers must register for the Office 365 Developer Preview. This allows them to access a dedicated developer site with an instance of Office 365 that can be used as a basis for writing, installing and testing apps; developers can then use Napa as described in detail in Microsoft's documentation. An introduction to Napa with screenshots is also available in a blog post by Jason Zander, Corporate VP for the Visual Studio Team in Microsoft's Developer Division. Developers can keep up-to-date with future developments by following the company's new "Apps for Office and SharePoint Blog".