Transformations Revealed

Slides:



Advertisements
Similar presentations
XML-XSL Introduction SHIJU RAJAN SHIJU RAJAN Outline Brief Overview Brief Overview What is XML? What is XML? Well Formed XML Well Formed XML Tag Name.
Advertisements

Inside an XSLT Processor Michael Kay, ICL 19 May 2000.
XML III. Learning Objectives Formatting XML Documents: Overview Using Cascading Style Sheets to format XML documents Using XSL to format XML documents.
HTML Basics Customizing your site using the basics of HTML.
DOCUMENT TYPES. Digital Documents Converting documents to an electronic format will preserve those documents, but how would such a process be organized?
ASP.NET Intro An introduction to the languages and communication of an ASP.NET system.
CG0119 Web Database Systems Parsing XML: using SimpleXML & XSLT.
XML: Extensible Markup Language
XSL XSLT and XPath 11-Apr-17.
XML: Managing Data Exchange Stylesheets. Lesson Contents CSS The basic XSL file XSL transforms Templates Sort Numbering Parameters and Variables Datatypes.
1 Mind Visual Diff An architecture comparison tool December 16 th, 2014 – v0.2.2 Seyvoz Stephane Assystem.
XML Unit 6 October 31. XML, review XML is used to markup data Used to describe information Uses tags like HTML –But all tags are user-defined –Must be.
XSL Concepts Lecture 7. XML Display Options What can XSL Transformations do? generation of constant text suppression of content moving text (e.g., exchanging.
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
Understanding Page Template Components Lila Bronson Training Manager, OmniUpdate, Inc.
Handling Security Threats in Kentico CMS Karol Jarkovsky Sr. Solution Architect Kentico Software
Virtual techdays INDIA │ august 2010 Building ASP.NET applications using SQL Server Compact Chaitanya Solapurkar │ Partner Technical Consultant,
XML on the Web: is it still relevant? O'Neil D. Delpratt.
ECA 228 Internet/Intranet Design I Intro to XSL. ECA 228 Internet/Intranet Design I XSL basics W3C standards for stylesheets – CSS – XSL: Extensible Markup.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
JSP Standard Tag Library
Different ways to implement CSS. There are four different ways to use CSS in your web pages: – Inline CSS – Embedded CSS/Internal CSS – Linked CSS/External.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
CPS120: Introduction to Computer Science The World Wide Web Nell Dale John Lewis.
Building Highly Scalable Websites Karol Jarkovsky Sr. Solution Architect
XML – Extensible Markup Language XML eXtensible – add to language. Markup – delimit info using tags. Language – a way to express info.
Introduction technology XSL. 04/11/2005 Script of the presentation Introduction the XSL The XSL standard Tools for edition of codes XSL Necessary resources.
XP New Perspectives on XML Tutorial 6 1 TUTORIAL 6 XSLT Tutorial – Carey ISBN
WORKING WITH XSLT AND XPATH
XP New Perspectives on XML, 2 nd Edition Tutorial 10 1 WORKING WITH THE DOCUMENT OBJECT MODEL TUTORIAL 10.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
JQUERY | INTRODUCTION. jQuery  Open source JavaScript library  Simplifies the interactions between  HTML document, or the Document Object Model (DOM),
Sustainable SharePoint 2010 Customizations By Bill Keys.
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
Effective Gathering of Requirements for Kentico CMS Project Karol Jarkovsky Consultant Kentico Software
Client side web programming Introduction Jaana Holvikivi, DSc. School of ICT.
Weekend MS CS Program Internet and Web Technologies COT 5930 Web Project Development - Ajax Dr. Roy Levow, Associate Chair & Professor
ECA 228 Internet/Intranet Design I XSLT Example. ECA 228 Internet/Intranet Design I 2 CSS Limitations cannot modify content cannot insert additional text.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
Transforming Documents „a how-to of transforming xml documents“ Lecture on Walter Kriha.
Lecture 11 XSL Transformations (part 1: Introduction)
1 3. Computing System Fundamentals 3.1 Language Translators.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
Handy separation the report template into pages Handy visual separation of the report template into pages is available in Stimulsoft Reports.Net. You.
ECA 228 Internet/Intranet Design I Intro to Markup.
Basic Web Design Using Dreamweaver Robby Seitz 121 Powers Hall
Declaratively Producing Data Mash-ups Sudarshan Murthy 1, David Maier 2 1 Applied Research, Wipro Technologies 2 Department of Computer Science, Portland.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
1 Overview of XSL. 2 Outline We will use Roger Costello’s tutorial The purpose of this presentation is  To give a quick overview of XSL  To describe.
The Web Wizard’s Guide to HTML Chapter One World Wide Web Basics.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
Web Technologies Lecture 4 XML and XHTML. XML Extensible Markup Language Set of rules for encoding a document in a format readable – By humans, and –
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
HTML A brief introduction HTML1. HTML, what is? HTML is a markup language for describing web documents (web pages). HTML stands for Hyper Text Markup.
Chapter 3 JSP Overview. The Problem with Servlets processing the request and generating the response are both handled by a single servlet class Java programming.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
VCE IT Theory Slideshows by Mark Kelly study design By Mark Kelly, vceit.com, Begin.
XSLT, XML Schema, and XPath Matt McClelland. Introduction XML Schema ▫Defines the content and structure of XML data. XSLT ▫Used to transform XML documents.
Rendering XML Documents ©NIITeXtensible Markup Language/Lesson 5/Slide 1 of 46 Objectives In this session, you will learn to: * Define rendering * Identify.
1 Introducing Web Developer Tools Rapid application development tools ASP.NET-compatible web editors –Visual Studio.NET Professional Edition –Visual Studio.
Advanced transformations in Kentico CMS Martin Hejtmanek (CTO), Webinar 8/19/2009.
Database Processing with XML
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
Introduction to Internet Programming
Database Driven Websites
HTML A brief introduction HTML.
Secure Web Programming
IntroductionToPHP Static vs. Dynamic websites
EXTENDING COMPONENTS AND TABLE TRANSFORMATIONS WITH XSL
Presentation transcript:

Transformations Revealed Karol Jarkovsky Consulting Services Manager Kentico Software http://devnet.kentico.com/blogs/karolj.aspx karolj@kentico.com Good morning everyone! My name is Karol Jarkovsky, I’m Sr. Solution Architect for Kentico and I’ll be your host for this month’s Partner Webinar. I’m happy to be here with you and I’m really excited about the topic we’re going to discuss today. We’re going to talk about transformations and I strongly believe that most of you already used transformations before, is that correct? Actually, if you used Kentico I’m like 100% positive you touched the transformation at some point. So let’s take a look at what is the motivation to learn about transformation, why it is so important…

Why Transformations Again? FACT Transformations are Alpha and Omega of content presentation FACT Kentico 5.5 R2 offers 2 transformation types (ASCX and XSLT)  Kentico 6.0 offers 5 types (ASCX, XSLT, Text/XML, HTML, jQuery) FACT Each type provides different performance in rendering HTML output on the server- side, GOAL Understand transformation types, what are pros and cons of each type and when it makes sense to use one type over another. NOTE If you are not familiar with concept of transformations please refer Transformations section in Kentico Developer’s Guide. FACT Transformations are Alpha and Omega of content presentation Transformation really is very basic element of the content presentation. It transforms raw data retrieved from the Kentico CMS database into whatever form you wish it to appear in on the Live site. It’s therefore crucial to understand what options you have, what are advantages or disadvantages of different transformation types available in the system and when it makes sense to use one type over another, FACT Kentico 5.5 R2 offers 2 transformation types (ASCX and XSLT) - Kentico 6.0 offers 5 types (ASCX, XSLT, Text/XML, HTML, jQuery) While with versions prior to the Kentico CMS 6.0 there were basically two transformation types available, such as ASCX transformation and XSLT transformation with the current version there are 3 new transformation types available so we’re looking at 5 types in total. There is obviously reason why we introduced these additional types and so I’d like to share that information with you today as well, FACT Each type provides different performance in rendering HTML output on the server-side Believe it or not, each transformation type has specific performance characteristics. Recently our Consulting Group is working on many Performance & Health Audit projects where we push the boundaries of client projects in terms of performance and scalability of the solution. Especially with higher traffic websites even apparently small decision like selecting the right transformation can have huge impact on the system at the end, GOAL Understand transformation types, what are pros and cons of each type and when it makes sense to use one type over another Our goal therefore is to understand characteristics of each transformation type available in the system, be clear about advantages and disadvantages of every one of them to be able to decide when to prioritize one type before another. NOTE If you are not familiar with concept of transformations please refer Transformations section in Kentico Developer’s Guide Please note that we aren’t going to cover much about how to write transformations, how you manage them and other essentials. I’m assuming that you know these basics. If you are not familiar with transformations please read through the related Developer’s Guide section. The link is included in the presentation that you can download after we publish recoding of this webinar on Kentico Devnet portal.

What’s New in 6.0? Transformation types ASCX < 6.0 XSLT < 6.0 Text/XML NEW HTML NEW jQuery NEW Transformation specific CSS styles More on CSS for page components The Theme tab More on App themes Object versioning More on Object versioning Macro expressions + K# + Intellisense More on Macro expressions Let’s quickly cover improvements done in transformations field for the current version of K[ay] CMS: Transformation types As I mentioned earlier only ASCX and XSLT transformations were available in the versions prior to release of Kentico CMS 6.0. With the current version we have introduced another 3 types – Text/XML, HTML and jQuery transformations. We’ll cover each type in a minute here. Transformation specific CSS styles One of the great enhancements to 6.0 version is definitely support for component CSS styles. For those of you not familiar with this new feature I recommend to look into Developer’s Guide following the link on the slide. What component CSS allows you to do is to define CSS styles bound to component only (in this case by component we understand transformation). The advantage is these styles are managed alongside transformation itself instead of global CSS style sheet, they’re exported along with the component only and are included on the page and transferred to the client only in the case that transformation is used on the page. Thus it’s considered improvement performance-wise and from manageability point of view. The Theme tab Another improvement in management of the transformation-related design elements is ability to manage content of App_Themes folder from the transformations UI. You can manage the content of sub-folder located in the App_Themes folder where system stores any transformation related files you upload on the Theme tab. You can reference these files in the transformation code or/and transformation CSS. Best part is theme folder content is exported along with the transformation, so you do not need to worry about files missing because you’d forget to export them manually. Object versioning Object versioning support allows you create new version on the transformation as you go, so you have option to roll-back to some of the previous versions in case you need to. Macro Engine + K# + Intellisense The last improvement I want to mention are features added to the transformation editor. With the current version you can take advantage of new Macro Engine and K# scripting language AND for certain transformation types (like Text/XML, XSLT or jQuery) you can also leverage capabilities of built-in Intellisense empowering your complex macro expressions. Let’s review available transformation types one by one next…

ASCX Transformations PROS Supports ASCX markup language, inline code and nested controls, DelayedLoading, StopProcessing properties to sync nested control’s life cycle, Provides access to the parent webpart properties, <%# GetDataControlValue("WebPartTitle") %> Custom functions implemented as static methods and called from transformations using full name. CONS Missing user-friendly macro expression support, no Intellisense, macros resolved using <%# CMSContext.CurrentUser.UserName %> <%# CMSContext.CurrentResolver.ResolveMacros("{%CMSContext.CurrentUser.UserName%}") %> ASCX transformation = virtual control = requires Virtual Path Provider to load and compile transformation on the fly = CPU + RAM overhead Application restarting caused by exceeding number of re-compiles

XSLT Transformations PROS XSLT = eXtensible Stylesheet Language Transformation, Data source-agnostic = can be used with any data source serialized to XML, XSLT only manipulates the source tree = original XML source is left unchanged, Filter/sort data on-the-fly = data retrieved just once, No SQL query with updated WHERE/ORDER BY executed to filter/sort (unlike other web parts do), Great when sharing the same data with other controls (re-using the content), Using XSL-FO = eXtensible Stylesheet Language – Formatting Objects = one can apply different flow to objects on the page creating adaptable design, User-friendly macro expressions support + Intellisense, NO compilation & VPP = no additional overhead, NOTE: XSLT attributes are case sensitive! CONS Doesn’t allow nested controls, inline code, Doesn’t use standard ASCX markup, The XSLT is a high-level declarative, transforming and formatting language. First, data retrieved from source needs to be serialized into XML. In Kentico you can use XSLT Viewer web part, serializing DataSet with documents matching specified criteria into XML You can of course develop custom Kentico data source web part serializing any source type (e.g. PDF document, TXT document, JSON response, etc.) into XML and connect it to the XSLT viewer afterwards. The XML source data are converted by compiler into a source tree structure which is composed of various types of nodes. Final transformation is accomplished with XSLT by using pattern matching and templates. Patterns are matched against the source tree while templates are used to create a result tree. Please note Kentico only invoke transformation process, XSLT template binding is done by .NET FW itself. Note that XSLT only manipulates the source tree and that the original XML source is left unchanged. As all templating is done on-the-fly and source data are unchanged you can re-use them multiple times. The most important aspect of XSLT is that it allows you to perform extremely complex manipulations (like data filtering and sorting) while the final output bear no resemblance to the source document. Also, unlike with standard data source or repeater web parts there is no need to execute another SQL query with changed WHERE/ORDER BY every time I want to filter/sort data.

Text/XML & HTML Transformations PROS Transformation code processed as standard HTML/XML, HTML transformations editable using WYSIWYG editor = HTML produced by editor, Updatable even when the VPP is not running in the target environment (medium trust OR pre-compiled website) = faster render time, User-friendly macro expressions support + Intellisense, NO compilation necessary = no additional overhead, The ApplyTransformation() macro function works with Text/XML transformations, Used to display content of objects retrieved through the macro expression as part of CONS Doesn’t allow nested controls, inline code, Doesn’t use standard ASCX markup,

jQuery Transformations PROS Less data transferred between server and client, Only template text + raw data are sent to the client, Binding performed on the client = overhead moved from application server to client, Updatable even when the VPP is not running in the target environment (medium trust OR pre-compiled website) = faster render time, User-friendly macro expressions support + Intellisense, NO compilation necessary = no additional overhead, CONS Slightly more effort involved in setting up jQuery templates, Need to implement jQuery call to retrieve source data from (e.g. using REST service to get content from CMS in JSON format), Doesn’t allow nested controls, inline code, Doesn’t use standard ASCX markup. jQuery transformation is actually template with HTML markup and binding expressions. This template is then applied to the array of objects and rendered into the HTML DOM. Template binding happens in the client browser not on the server which means you’re also saving application server resources by passing part of the load on the client machine. The most important is that using jQuery templates you can reduce total amount of data transferred between application/server and client which helps freeing some bandwidth and at the same time increase latency of your application. That’s why jQuery templates are heavily used in mobile environment. Instead of refreshing the whole page or sending larger fragments of HTML code (as that would be the case with AJAX or asynchronous callbacks) you can transfer only raw data from server and bind them on client using jQuery templates. With this approach you are going to be making fewer calls and moving less data to the client at the end. Hope you see it in there.

Hierarchical Transformations Nested repeaters vs. Universal Viewer (using Hierarchical Transformation) Nested repeater executes SELECT query for every parent document, Universal Viewer executes single SELECT query for each document type, Single SELECT per doc type no matter how many parent documents are being displayed, Regular viewer (e.g. repeater) vs. Universal Viewer (Hierarchical Transformation) when displaying multiple doc types Standard viewer does not persists content hierarchy from the content tree = each document type loaded as a separate DataTable within resulting DataSet, Web parts supporting Hierarchical Transformations New alternative to nested repeaters, Allows you display multiple document types by single viewer web part, You can apply different transformation based on document type and nested level You can display documents of the same document type in multiple ways based on their position in the content tree.

What’s new in 7.0? Transformation preview, Intellisense inside transformation editor displaying document/object properties based on the current context,      Support for nested objects in the Eval() function Eval("SKU.SKUManufacturer.ManufacturerDisplayName")

Questions & Answers ?

Thank you! Thank you for joining me today, hope you found this topic at least as interesting as I do. I wish you have great rest of the day and see you again next time! Thank you!