7. Ilesh Mistry
Mini Mistrys…
- Short videos on various
Kentico topics
- How to guides
- Smart Search is the
beginning…
- Any suggestions let me know
@ileshmistry | #KenticoConnection
10. Common mistakes in site delivery
Search doesn’t work
Analytics not working
Dropped in SEO ranking
Can’t access Online Marketing
Page is running slow
Can’t access admin area
Seeing error pages
Etc…
Make sure you site is ready ready and not just finished
@ileshmistry | #KenticoConnection
11. Delivering client sites - Agenda
Kentico Connection Site Delivery Checklist (#KenticoConnectionSDC)
UI Admin
EMS configuration
Front End Optimisation Techniques
URLs & SEO
Performance
Caching
Testing during site development
Security
Staying alive
Any other things?
@ileshmistry | #KenticoConnection
13. UI Admin
Customise dashboard and
applications list
Roles and permissions
Page Types child items
Workflow
Resize image on upload
Build all Smart Search indexes that are needed across site?
Cleaned up the content tree and removed any unwanted items?
Page type icons
Forms & Form Layouts
Switched on various settings
Clean up templates and widgets they can select
Kentico Editor output styling e.g. Bullet point list
Use the new Version 9 Web Parts and Widget Usages to locate
@ileshmistry | #KenticoConnection
New in Version 9
14. EMS configuration
Set-up Widgets where you can?
Turned on/enabled Online Marketing options?
Enabled A/B Testing and MVT option
Enabled Content Personalization option
Thought about tracking conversions, if so use the conversion
form control field
Mapped Form fields to allow for contacts within Kentico
@ileshmistry | #KenticoConnection
15. Front End Optimisation Techniques
Image optimisation
Store in Filesystem
Upload size
Store files elsewhere
Images
Videos
GZIP / output
compression
@ileshmistry | #KenticoConnection
16. Front End Optimisation Techniques
Minification
(JS, CSS, Images etc…)
Task runner e.g. Grunt
@ileshmistry | #KenticoConnection
17. Front End Optimisation Techniques
Responsive Design
@ileshmistry | #KenticoConnection
Source: https://kinsta.com/learn/page-speed/
18. URLs and SEO
URL Redirects
Same URLs
Allowed extensions
Canonical Links
Page Not Found
Robots, Google Sitemap and
Google Analytics
Thinking about multiple cultures would help with
this
HTML structures and syntax
Structured data e.g. Schema.org
(https://developers.google.com/structured-
data/testing-tool/)
@ileshmistry | #KenticoConnection
19. Performance
Kentico documentation for speeding up the website
Web part performance best practice
Only render what is required for that section not unrequired
items (e.g. non mandatory fields markup showing up)
Bad backend coding
@ileshmistry | #KenticoConnection
20. Performance
SQL Debugger
Real time SQL debugging
Looking at columns you need
to use and not all
Different places to view it
Performance benefit
You know what to do when
you have finished with it!
@ileshmistry | #KenticoConnection
21. Performance
SQL Debugger
Under Debug SQL Queries
Example of a Hierarchical Viewer with
multiple Page Types
@ileshmistry | #KenticoConnection
23. Performance - Recommendations
I would recommend to always check the SQL Debugger /
Kinspector
Then if things look bad, use the web part with SQL Query in
them so you define what the query / data source is and it is not
something you just let Kentico handle
There are always and will be different scenarios to use some
options over others, it all depends per project
@ileshmistry | #KenticoConnection
24. Caching
What are you
going to cache?
Main types
Output caching
Partial Caching
CacheHelper.Cache
Debugging cache
Output cache
substitutions
To cache or not to
cache that is the
question
@ileshmistry | #KenticoConnection
private void BindGridCachedSection()
{
DataSet ds = null;
using (CachedSection<DataSet> cs = new CachedSection<DataSet>(ref
ds, new CacheSettings(60, "UsersDataset")))
{
if (cs.LoadData) { ds = LoadUsersFromDB("UserEnabled=1"); }
}
grid.DataSource = ds;
grid.DataBind();
}
private void BindGridTheBest()
{
grid.DataSource = CacheHelper.Cache(() =>
LoadUsersFromDB("UserEnabled=1"), new CacheSettings(60,
"UsersDataset"));
grid.DataBind();
}
Server/content cache Code from Petr Svihlik slides Kentico Developer Roadshow - London
25. Testing during site development
Kentico validation
HTML
CSS
Link checker
Accessibility
Online validation
@ileshmistry | #KenticoConnection
26. Testing during site development
JS Unit Testing
Jasmine & Karma
@ileshmistry | #KenticoConnection
27. Testing during site development
JS Unit Testing
Jasmine & Karma
@ileshmistry | #KenticoConnection
28. Testing during site development
.Net Unit Testing
NUnit
Mocking with MOQ
outside Kentico
Custom Services
@ileshmistry | #KenticoConnection
29. Testing during site development
.Net Unit Testing
NUnit
Mocking with MOQ
outside Kentico
Custom Services
@ileshmistry | #KenticoConnection
30. Testing during site development
Cross browser and
device testing
Selenium automated
testing
@ileshmistry | #KenticoConnection
31. Security
Run site through HTTPS
Stress Testing / Concurrent Testing e.g. Seige
Penetration Testing
Open Web Application Security Project
(OWASP) Top 10 Security Vulnerabilities
Injection
Cross Site Scripting
Anti CSRF (Cross-Site Request Forgery)
Etc…
Now improved in version 9 protection against CSRF by employing
anti-CSRF tokens
Great article by Juraj Komlosi on this
@ileshmistry | #KenticoConnection
32. Staying alive
There are tools out there that check sites
UpTrends
Uptime Robot
StatusCake
Pingdom
Get alerts before the client does so you can resolve them
quickly
@ileshmistry | #KenticoConnection
33. Any other things?
Kentico Setup Installer
Follow my blog post on setting up a base site template
@ileshmistry | #KenticoConnection
Hi everyone
Introduction
What talk is going to be about
Kentico Gold partner
Working with Kentico since version 3.1
Front End Kentico Specialist
Solutions Architect, looking after a Kentico Development Team and a part of the K Team at MMT Digital, pushing out Kentico knowledge and standards across the company and Kentico community
Kentico MVP – honour and privileged to be Kentico MVP –
Love Best Practices!
Before I get started I want to talk about some of the common mistakes
GAME TIME
But before we do, I want to try this and see what we can do together
- #KenticoConnectionSDC on Twitter add your suggestions
Not sure how this is going to work
Generate checklist to circulate and write post
New in version 9 is the ability of pinning items from the breadcrumbs
Forms
Tested that all forms submit correctly?
Validated for incorrect and successful entries?
Validated the send email notifications?
Cleared out test data?
Made the form layout easy for content editor to follow?
Made sure SMTP server is set up, as too often we developers rely on E-mail Queue
Image optimisation
In Kentico can set default / preferred image sizes
Host elsewhere CDN? Videos on YouTube
Kentico
HTML Validation
Accessibility checking
Anything else?
Gzip compression
Enable output compression
Store in Filesystem is better than DB & generate thumbnail
Minimisation techniques e.g. Grunt, Gulp etc…
CSS and JS minifications
SVG and Icon Fonts
Grunt JS (what it is, how it works, set up, Grunt JS)
JS Task Runner with NodeJS (npm)
Useful for realtime tasks e.g. Save and see the changes
Install locally
Create a Package.JSON file
Grunt file
Load plugins and tasks
Show Grunt plugin for SVG optimisation
Minification plugin for CSS and JS
This ties in with website speed/performance
Talk about Kentico Performance a little later on
Drop off rates
Google Rankings
Mobile Responsive
Google and Yahoo Page Speed testing
Same URLs = convert to all lowercase
Explain that there is a SEO section is site settings
301 redirects
Short selectors
Exclude listing and results pages from search
Page not found 404
Other list of the error codes
Meta data
URL Redirects Module from Kentico - http://devnet.kentico.com/articles/url-redirection
Canonical Links Module from Kentico - http://devnet.kentico.com/articles/canonical-links
Reduce number of HTTP requests
HTML Hierarchy
Designers with no Heading 1 on the homepage or landing pages
https://developers.google.com/structured-data/testing-tool/
URL Redirects Module from Kentico - http://devnet.kentico.com/articles/url-redirection
Canonical Links Module from Kentico - http://devnet.kentico.com/articles/canonical-links
Andy Thompson Kentico MVP’s blog posts (shout out)
http://www.getstarted.com.au/Blog/July-2015/Kentico-Website-Speed-Optimisation-Basics
https://github.com/Kentico/Kinspector
Look Kentico speed options
Web part performance best practice
The name and SQL code of the query.
The Context in which the query was called.
Click on the method to see the full stack trace.
If you enable the Show complete context option at the top of the interface, the stack trace is displayed for all queries.
The Duration of the query execution.
The total size of the data retrieved by the query.
SQL Debugger
Look into this
How to switch on?
How to identify problems?
How to fix problems?
REMEMBER TO SWITCH IT OFF AFTER YOU FINISH USING IT
Hierarchical viewer with multiple Page Types example. Show the SQL query for this and how long it is
http://localhost/Kentico9_10/Examples/Web-parts/Listings-and-viewers/Pages/Hierarchical-viewer.aspx
GetFileURL or other methods add to the other queries to retrieve this information, so the less you can do this the better, maybe even using the Media Library and Media Selection form control if such an option would be available.
The name and SQL code of the query.
The Context in which the query was called.
Click on the method to see the full stack trace.
If you enable the Show complete context option at the top of the interface, the stack trace is displayed for all queries.
The Duration of the query execution.
The total size of the data retrieved by the query.
https://github.com/Kentico/Kinspector
Kinspector – easy to set up, currently only works for Version 8
Open Source
KInspector is an application for analyzing health, performance and security of your Kentico solution
http://localhost/Kentico81
http://localhost:9000/FrontEnd/index.html#/results/
Cache types
Kentico provides the following types of caching:
Output cache (full page) - caches the full HTML output of pages.
Partial output cache - caches the HTML output of individual page components (web parts).
File cache - stores files and resources, such as images, CSS stylesheets or JavaScript files. Supports both server and client-side caching.
Content cache - stores structured data loaded by web parts and controls (for data sources, repeaters, etc.).
Page info cache - stores basic information about pages (documents).
Custom code cache - allows developers to cache data used in custom code.
Output cache substitutions – some sections of an Output caching need to be dynamic
Dynamic elements like shopping cart, constantly changing features/elements, user updated content
Jasmine is a behaviour-driven development framework for testing JavaScript code.
It does not depend on any other JavaScript frameworks.
It does not require a DOM. And it has a clean, obvious syntax so that you can easily write tests.
Run Karma
... launches [PhantomJS, Chrome, Firefox, Internet Explorer etc.]
... sends individual tests to the browsers
... collects test output
... plugins generate reports [Coverage, JUnit etc.]
NUnit is the current unit test library
Test must use the Arrange, Act , Assert layout
They should be simple and easy to read.
MOQ – is the mocking library
Mocking allows dependencies to be ‘Mocked’ so the real dependency is not required to run the test.
Selenium is a portable software testing framework for web applications.
https://devnet.kentico.com/articles/protection-against-cross-site-request-forgery-(csrf-xsrf)
https://www.youtube.com/user/IBMSecuritySolutions/search?query=OWASP+Top+10+Vulnerabilities
Injection
Broken Authentication and Session Management (XSS)
Cross Site Scripting (XSS)
Insecure Direct Object References
Security Misconfiguration
Sensitive Data Exposure
Missing Function Level Access Control
Cross Site Request Forgery (CSRF)
Using Components with Known Vulnerabilities
Unvalidated Redirects and Forwards