This document summarizes a presentation on hardboiled front end development. It discusses CSS architecture including OOCSS, BEM, Sass and living styleguides. It also covers JavaScript modularity using tools like RequireJS and managing dependencies with Bower. Additional topics include automating tasks with Grunt, an overview of Angular and Backbone, and some useful JavaScript libraries and plugins.
Slides from Node.js and Twitter Bootstrap crash course given to Penn Graduate Computing Club. Covers creating basic node app, using the bootstrap grid, and deploying to an EC2 machine.
Building responsively allows us to create flexible user interfaces that support the widest possible audience with a single front-end codebase. But in embracing the ever-increasing contexts in which our sites are used, performance and accessibility must remain our highest priorities; we must continually question each code addition, and improve our delivery and application techniques to ensure they’re best serving users’ needs.
This talk will explore the challenges of creating fast and broadly-accessible websites and offer approaches that dramatically improve performance, usability, access, and sustainability.
This presentation will introduce Bower, a powerful package manager for libraries, frameworks, and all things front-end. We will cover basic Bower usage, integration into Grunt & Gulp build processes, tooling, and registering custom packages to be used by anyone.
Using the YUI App Framework we can build native Windows 8 apps with access to hardware and native APIs while reducing our overall code-base.
The views and models that you write for your web app can be re-used for Windows 8.
RSVP Node.js class at www.nycdatascience.com
NYC data science academy's free workshop, given at NYC Open Data Meetup, http://www.meetup.com/NYC-Open-Data/events/163300552/
HTML5 and CSS3: does now really mean now?Chris Mills
Code at http://people.opera.com/cmills/css3book/css3-html5-dnrmn.zip. The browser vendors love them! The browser fans and cutting edge designers are producing some really remarkable stuff, but what do HTML5 and CSS3 really mean for you, the pragmatic designer on the street? If you sidle up to one of those guys and whisper "but what about IE6 support", they are likely to slap you in the face, or run away with their hands clamped over their ears, yelling "la lala lala, I can't hear you." In this talk, Chris Mills will have a look at some of the new features of HTML5 and CSS3 - new semantics, video, media queries, rounded corners, web fonts, drop shadows and more. He will show real world examples, and then look at how they actually perform on those shady older browsers we are often called on to support. He will then look at strategies for providing support for those older browsers, including using JavaScript, fallbacks, and progressive enhancement.
Slides from Node.js and Twitter Bootstrap crash course given to Penn Graduate Computing Club. Covers creating basic node app, using the bootstrap grid, and deploying to an EC2 machine.
Building responsively allows us to create flexible user interfaces that support the widest possible audience with a single front-end codebase. But in embracing the ever-increasing contexts in which our sites are used, performance and accessibility must remain our highest priorities; we must continually question each code addition, and improve our delivery and application techniques to ensure they’re best serving users’ needs.
This talk will explore the challenges of creating fast and broadly-accessible websites and offer approaches that dramatically improve performance, usability, access, and sustainability.
This presentation will introduce Bower, a powerful package manager for libraries, frameworks, and all things front-end. We will cover basic Bower usage, integration into Grunt & Gulp build processes, tooling, and registering custom packages to be used by anyone.
Using the YUI App Framework we can build native Windows 8 apps with access to hardware and native APIs while reducing our overall code-base.
The views and models that you write for your web app can be re-used for Windows 8.
RSVP Node.js class at www.nycdatascience.com
NYC data science academy's free workshop, given at NYC Open Data Meetup, http://www.meetup.com/NYC-Open-Data/events/163300552/
HTML5 and CSS3: does now really mean now?Chris Mills
Code at http://people.opera.com/cmills/css3book/css3-html5-dnrmn.zip. The browser vendors love them! The browser fans and cutting edge designers are producing some really remarkable stuff, but what do HTML5 and CSS3 really mean for you, the pragmatic designer on the street? If you sidle up to one of those guys and whisper "but what about IE6 support", they are likely to slap you in the face, or run away with their hands clamped over their ears, yelling "la lala lala, I can't hear you." In this talk, Chris Mills will have a look at some of the new features of HTML5 and CSS3 - new semantics, video, media queries, rounded corners, web fonts, drop shadows and more. He will show real world examples, and then look at how they actually perform on those shady older browsers we are often called on to support. He will then look at strategies for providing support for those older browsers, including using JavaScript, fallbacks, and progressive enhancement.
stickyHeader.js is a script I wrote to make table headers stick to the top of the viewport of a browser when scrolling down them. This makes it easier to understand the data. This presentation walks you through how I built it.
The code is available at https://github.com/kingkool68/stickyHeader
It's been 6 years since the term Responsive Web Design (RWD) was coined and today is difficult to see new projects without implementing it. But this time has allowed us to see the implementation can be even more important than the technique and the theory.
The RWD covers from the performance to the implementation of patterns and "standard" behaviors to improve usability.
In this session reviewed tools, techniques and concepts to improve our projects:
- Performance and best practices
- CSS structuring and optization (BEM, SMACSS, etc.)
- Fixed-Pixel vs rem, em and %
- Responsive images. Drupal non-Drupal solutions and SVGs
- Asynchronous Javascript loading
- Typography in a responsive environment and FOUT, FOIT effects
- How proxy-based browsers like Opera Mini can affect, and how accessibility and Progressive Enhancement can help.
- Beyond the Mouse: Touch and keyboard events
- Using RWD patterns
Responsive Web Design: Clever Tips and TechniquesVitaly Friedman
Responsive Web design challenges Web designers to adapt a new mindset to their design and coding processes. This talk provides an overview of various practical techniques, tips and tricks that you might want to be aware of when working on a new responsive design project.
Tek 2013 - Building Web Apps from a New Angle with AngularJSPablo Godel
AngularJS is a new JavaScript framework, backed by Google, for building powerful, complex and rich client-side web applications. We will go over the features and basics of building a web application with AngularJS and we will demonstrate how to communicate with a REST server built with PHP.
Here are some of the stuff I learnt while making it, and if you are working on responsive design, you should probably keep this as reference. Note: You are free to download, edit, distribute and use this work in any way you want.
Levent-Gurses' Introduction to Web Components & PolymerErik Isaksen
This is in a developer-focused session on developing iOS apps with Web Components and Google Polymer.
Web Components usher in a new era of web development based on encapsulated and interoperable custom elements that extend HTML itself. Built atop these new standards, Polymer makes it easier and faster to create anything from a button to a complete application across desktop, mobile, and beyond.
Single Page JavaScript WebApps... A Gradle StoryKon Soulianidis
From MelbJVM July 2014
This presentation covers building single page web applications with Gradle, including why we chose to use Gradle instead of a more commonly used JS based build tool, and the benefits by integrating a JS webapp into the JVM environment.
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]Dirk Ginader
Google’s Dirk Ginader thinks great developers are lazy, and there’s nothing wrong with that. After all, would you rather spend your time working on the mundane stuff — like minification, linting, compilation, unit testing, etc — or actually developing your code?
In this presentation, Dirk will show you how to set up the Grunt JavaScript Task Runner so that you and your team can focus on the fun!
Video at http://www.youtube.com/watch?v=HaJnhYPLvx0
Large Drupal projects will generally have a themer or five working alongside the developers, site builders and designers. Themers are the magicians who transform what Drupal wants to do into what the designer wants it to do.
Smaller projects also usually need someone on the team who can make sense of Drupal's output, knows more CSS and JS than anyone else and can configure Views with their eyes closed.
The thing is — and whisper this, if possible redundancy concerns you — we can bypass the themer entirely.
With some simple configuration, a site builder can get Drupal to output exactly the semantic, lightweight markup that any modern front-end designer would be proud of. The designer can be left alone to write the most appropriate HTML, CSS and JS, while the site builder need only choose a couple of options when putting together content types, views and panels to make Drupal behave.
A friendly developer may have to lend a hand every now and then, but that’s it. You can get rid of the themer altogether.
http://2013.drupalcamplondon.co.uk/session/death-themer
stickyHeader.js is a script I wrote to make table headers stick to the top of the viewport of a browser when scrolling down them. This makes it easier to understand the data. This presentation walks you through how I built it.
The code is available at https://github.com/kingkool68/stickyHeader
It's been 6 years since the term Responsive Web Design (RWD) was coined and today is difficult to see new projects without implementing it. But this time has allowed us to see the implementation can be even more important than the technique and the theory.
The RWD covers from the performance to the implementation of patterns and "standard" behaviors to improve usability.
In this session reviewed tools, techniques and concepts to improve our projects:
- Performance and best practices
- CSS structuring and optization (BEM, SMACSS, etc.)
- Fixed-Pixel vs rem, em and %
- Responsive images. Drupal non-Drupal solutions and SVGs
- Asynchronous Javascript loading
- Typography in a responsive environment and FOUT, FOIT effects
- How proxy-based browsers like Opera Mini can affect, and how accessibility and Progressive Enhancement can help.
- Beyond the Mouse: Touch and keyboard events
- Using RWD patterns
Responsive Web Design: Clever Tips and TechniquesVitaly Friedman
Responsive Web design challenges Web designers to adapt a new mindset to their design and coding processes. This talk provides an overview of various practical techniques, tips and tricks that you might want to be aware of when working on a new responsive design project.
Tek 2013 - Building Web Apps from a New Angle with AngularJSPablo Godel
AngularJS is a new JavaScript framework, backed by Google, for building powerful, complex and rich client-side web applications. We will go over the features and basics of building a web application with AngularJS and we will demonstrate how to communicate with a REST server built with PHP.
Here are some of the stuff I learnt while making it, and if you are working on responsive design, you should probably keep this as reference. Note: You are free to download, edit, distribute and use this work in any way you want.
Levent-Gurses' Introduction to Web Components & PolymerErik Isaksen
This is in a developer-focused session on developing iOS apps with Web Components and Google Polymer.
Web Components usher in a new era of web development based on encapsulated and interoperable custom elements that extend HTML itself. Built atop these new standards, Polymer makes it easier and faster to create anything from a button to a complete application across desktop, mobile, and beyond.
Single Page JavaScript WebApps... A Gradle StoryKon Soulianidis
From MelbJVM July 2014
This presentation covers building single page web applications with Gradle, including why we chose to use Gradle instead of a more commonly used JS based build tool, and the benefits by integrating a JS webapp into the JVM environment.
Let Grunt do the work, focus on the fun! [Open Web Camp 2013]Dirk Ginader
Google’s Dirk Ginader thinks great developers are lazy, and there’s nothing wrong with that. After all, would you rather spend your time working on the mundane stuff — like minification, linting, compilation, unit testing, etc — or actually developing your code?
In this presentation, Dirk will show you how to set up the Grunt JavaScript Task Runner so that you and your team can focus on the fun!
Video at http://www.youtube.com/watch?v=HaJnhYPLvx0
Large Drupal projects will generally have a themer or five working alongside the developers, site builders and designers. Themers are the magicians who transform what Drupal wants to do into what the designer wants it to do.
Smaller projects also usually need someone on the team who can make sense of Drupal's output, knows more CSS and JS than anyone else and can configure Views with their eyes closed.
The thing is — and whisper this, if possible redundancy concerns you — we can bypass the themer entirely.
With some simple configuration, a site builder can get Drupal to output exactly the semantic, lightweight markup that any modern front-end designer would be proud of. The designer can be left alone to write the most appropriate HTML, CSS and JS, while the site builder need only choose a couple of options when putting together content types, views and panels to make Drupal behave.
A friendly developer may have to lend a hand every now and then, but that’s it. You can get rid of the themer altogether.
http://2013.drupalcamplondon.co.uk/session/death-themer
Building Performance - ein Frontend-Build-Prozess für Java mit MavenOliver Ochs
Jan Weinschenker und Oliver Ochs (Holisticon AG)
In diesem Vortrag geht es um eine konkrete Website. Im ersten Teil des Vortrags stellen wir die wichtigsten Optimierungsmaßnahmen vor, die außerhalb eines Builds durchgeführt wurden. Für eine dauerhafte, nachhaltige Performance-Optimierung müssen die Maßnahmen automatisiert bzw. in den Build-Prozess integriert werden. Im zweiten Teil des Vortrags zeigen wir einen beispielhaften Build-Prozess für Java-Webanwendungen, der Teile der Optimierungsmaßnahmen durchführt. Andere Teile müssen durch eine geeignete Architektur sichergestellt werden, wofür wir ebenfalls Ideen liefern.
EnterJS 2015 - Continuous Integration for Frontend CodeMarcel Birkner
Continuous Integration gehört in den meisten Unternehmen mittlerweile zum guten Ton, oft aber nur mit Blick auf die Server-Seite. Dabei kommt heute keine Anwendung mehr ohne Frontend-Code aus. Dieser wird - gerade im Enterprise-Bereich - oft vernachlässigt. In diesem Vortrag wird ein CI-Setup mit Fokus auf das Frontend vorgestellt. Automatisierte Tests, Sourcecode Quality Management und andere typische Bestandteile sind für den Frontend-Code genauso wichtig wie für das Backend. Durch Asset-Optimierung kann die Performance, gerade für mobile Clients, deutlich gesteigert werden. Gezeigt werden Tools, Methoden und Best Practices für den Aufbau und die Umsetzung der Delivery-Pipeline. Zum Einsatz kommen dabei Grunt, ESLint, Mocha und Jenkins.
The New UI - Staying Strong with Flexbox, SASS, and {{Mustache.js}}Eric Carlisle
This presentation is a hands-on workshop exploring a medley of client-side web technologies. Flexbox is a CSS layout model that may simplify what usually are very complex layouts. SASS is a CSS wrapper extension / preprocessor allowing CSS to me more maintainable and approachable. Mustache.js is an logicless HTML tool using JavaScript.
CSMess to OOCSS: Refactoring CSS with Object Oriented DesignKate Travers
Ask any web developer: the most neglected part of their site/app is likely its CSS. Unlike other parts of the stack, most CSS is messy, complex, and long overdue for a rewrite. But it doesn’t have to be. Break out of these bad patterns by applying an object oriented CSS framework (OOCSS).
This talk will step through the process of designing, building, and implementing a custom OOCSS framework for a mid-sized web application, outlining the basic methodology, best practices, and expected outcomes, which include significant gains in both front-end performance as well as developer productivity.
Written transcript:
http://blog.kate-travers.com/how-oo-design-saved-our-css-and-site-performance/
Advanced Front End Architecture in D8: Sass, Gulp, & Living Style GuidesAidan Foster
VIDEO RECORDING: https://www.youtube.com/watch?v=NNmYqcPam6I
This session Originally was Presented at Drupal North 2016 - Montreal, Canada.
http://www.drupalnorth.org/en/session/advanced-front-end-architecture-d8-sass-gulp-and-living-style-guides
In this advanced session we will review the front-end tools & setup we use at Foster Interactive in our Drupal themes. This suite of tools is bundled in an open-source starter kit called Mainspring.
Main-spring.io was created internally to allow us to kick off projects faster. It’s basically a clean slate where all the interesting tools and best practices we’ve observed in other open-source projects have been bundled together in a way that works with Drupal.
Mainspring has evolved to include 3 major components:
1. Gulp/Node Based Development tools to help us code faster and with less bugs.
2. Living Style guide: (Think a custom, automatically documented version of Twitter Bootstrap for each project)
3. Sass Components / Structure (Opinionated refinement of the Drupal 8 CSS coding standards)
The tools used in mainspring are all "Proudly Built Elsewhere". This session is intended to showcase what works for us. Hopefully you’ll see something interesting you can start using in your own project.
Creating Responsive Drupal Sites with Zen Grids and the Zen 5 ThemeAcquia
Too many responsive websites fall into the "move the sidebars around" trap and end up looking the same as any other responsive site. By combining the CSS of Zen Grids and the smart markup of the Zen 5 theme, you can create a stellar, unique responsive design for your website with ease.
Zen has always been a popular starting point for building Drupal themes, but the new Zen 5 has been re-written from the ground-up with updated best practices including HTML5, Modernizr integration, Normalize, IE conditional classes, responsive layouts, and, best of all, Sass and Compass integration.
Zen Grids is an all new project, independent from the Zen theme. The Zen Grids system reinvents the flexible, but complicated CSS layout method in old versions of the Zen theme, transforming it into a radically simplified process using the power of Sass. Where traditional grid systems (like 960.gs) often don't scale to match a responsive design's requirements, Zen Grids makes it incredibly easy to create amazing responsive layouts in just a couple lines of code.
Responsive Design from problem to productionDavid Douglas
A Responsive Web Design talk for designers and developers given at the DECODED Conference held in Dublin on 6th May 2016.
This talk covers:
- the tooling issues facing responsive designers
- the pain points facing responsive web developers
- and the pitfalls in production.
Read more on 'Responsive Design from problem to production' on my dev blog:
http://j.mp/ResponsiveDesigners
Web Frontend development: tools and good practices to (re)organize the chaosMatteo Papadopoulos
After my first attempt to "organize the chaos" (2012) in the structure of a front-end project, Stefano Verna (@steffoz) and I, have tried to bring together a number of tools and conventions to deal with front-end development in a way that could be understandable and maintainable, over the time, by a whole team.
This presentation has been performed, for the first time, during the Ruby-Day-2014 in Venice, Italy.
Here the video of the speech (italian): https://www.youtube.com/watch?v=fUJOJY_yVXg&index=6&list=PL5ImBN21eKvbQ6kH6WCAqj1QqgusGsiO0
Similar to Hardboiled Front End Development — Found.ation (20)
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Welcome to WIPAC Monthly the magazine brought to you by the LinkedIn Group Water Industry Process Automation & Control.
In this month's edition, along with this month's industry news to celebrate the 13 years since the group was created we have articles including
A case study of the used of Advanced Process Control at the Wastewater Treatment works at Lleida in Spain
A look back on an article on smart wastewater networks in order to see how the industry has measured up in the interim around the adoption of Digital Transformation in the Water Industry.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
Forklift Classes Overview by Intella PartsIntella Parts
Discover the different forklift classes and their specific applications. Learn how to choose the right forklift for your needs to ensure safety, efficiency, and compliance in your operations.
For more technical information, visit our website https://intellaparts.com
HEAP SORT ILLUSTRATED WITH HEAPIFY, BUILD HEAP FOR DYNAMIC ARRAYS.
Heap sort is a comparison-based sorting technique based on Binary Heap data structure. It is similar to the selection sort where we first find the minimum element and place the minimum element at the beginning. Repeat the same process for the remaining elements.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
Student information management system project report ii.pdfKamal Acharya
Our project explains about the student management. This project mainly explains the various actions related to student details. This project shows some ease in adding, editing and deleting the student details. It also provides a less time consuming process for viewing, adding, editing and deleting the marks of the students.
We have compiled the most important slides from each speaker's presentation. This year’s compilation, available for free, captures the key insights and contributions shared during the DfMAy 2024 conference.
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...ssuser7dcef0
Power plants release a large amount of water vapor into the
atmosphere through the stack. The flue gas can be a potential
source for obtaining much needed cooling water for a power
plant. If a power plant could recover and reuse a portion of this
moisture, it could reduce its total cooling water intake
requirement. One of the most practical way to recover water
from flue gas is to use a condensing heat exchanger. The power
plant could also recover latent heat due to condensation as well
as sensible heat due to lowering the flue gas exit temperature.
Additionally, harmful acids released from the stack can be
reduced in a condensing heat exchanger by acid condensation. reduced in a condensing heat exchanger by acid condensation.
Condensation of vapors in flue gas is a complicated
phenomenon since heat and mass transfer of water vapor and
various acids simultaneously occur in the presence of noncondensable
gases such as nitrogen and oxygen. Design of a
condenser depends on the knowledge and understanding of the
heat and mass transfer processes. A computer program for
numerical simulations of water (H2O) and sulfuric acid (H2SO4)
condensation in a flue gas condensing heat exchanger was
developed using MATLAB. Governing equations based on
mass and energy balances for the system were derived to
predict variables such as flue gas exit temperature, cooling
water outlet temperature, mole fraction and condensation rates
of water and sulfuric acid vapors. The equations were solved
using an iterative solution technique with calculations of heat
and mass transfer coefficients and physical properties.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
1. berlin amsterdam san francisco stuttgart
edenspiekermann_
Hardboiled Front End
Development
Found.ation talk
10th June 2014
2. Hardboiled Front End Development 10.06.2014edenspiekermann_
Introduction
Web Developer at Edenspiekermann.
!
Previously:
– Head of Design @ DailySecret.com.
– Head of Front End @ Liberis Publications.
!
Enjoys:
– CSS architecture.
– Refactoring code.
2
3. Hardboiled Front End Development 10.06.2014edenspiekermann_
Contents
1. CSS Architecture
–OOCSS. Design modules, not pages.
–BEM. Protecting scope. Hacking CSS.
–Sass. Enabling modularity. Pitfalls of extending and using mixins.
–Living Styleguides. Keeping the mess observable.
–Best Practices. Class prefixes, shame.css, z-index.css.
!
2. Javascript Modularity
–Modularity. Breaking the $(document).ready long file into modules.
–Module Tools. Including functionality on demand with requireJS.
–Automating tasks. Automating with Grunt and managing packages with Bower.
–Frameworks. Angular, Backbone, a very quick overview.
–Little useful tools. Backbone.wreqr, waypoints, owl carousel.
3
5. Hardboiled Front End Development 10.06.2014edenspiekermann_
CSS Architecture
CSS Advantages:
– Fast, quick to put something out.
– Small learning curve.
– Easy to override defaults.
!
Problems with CSS:
– All the above :-).
– No inherent modularity.
– No scope.
– Specificity.
5
22. Hardboiled Front End Development 10.06.2014edenspiekermann_
CSS Architecture
Advantages:
– Nice overview of all your objects.
– Enforces good practices.
– Enhances developer — designer collaboration.
– Helpful for context free development.
!
Challenges:
– Hard to initially set up.
– If not set up correctly, can have dulicate views in production & styleguide.
– Same object, different data issues.
!
Tools:
– https://github.com/kneath/kss
– http://livingstyleguide.org
– http://kaleistyleguide.com/
22
23. Hardboiled Front End Development 10.06.2014edenspiekermann_
gem install kss
CSS Architecture
Setting up KSS.
– Install gem.
23
24. Hardboiled Front End Development 10.06.2014edenspiekermann_
@styleguides = Kss::Parser.new(“/
public/css“)!
CSS Architecture
Setting up KSS.
– Install gem.
– Parse CSS folder into an object.
24
25. Hardboiled Front End Development 10.06.2014edenspiekermann_
CSS Architecture
Setting up KSS.
– Install gem.
– Parse CSS folder into an object.
– Iterate object in view.
25
- @styleguides.each do |styleguide|!
- [...]!
26. Hardboiled Front End Development 10.06.2014edenspiekermann_
/*!
The global button object.!
!
.button - Primary button.!
.button--green - Green variation.!
!
Styleguide 1.0 Button!
*/!
!
.button {!
height: 20px;!
text-align: center;!
width: 100px;!
}!
!
.button--green {!
background-color: green;!
}!
CSS Architecture
Setting up KSS.
– Install gem.
– Parse CSS folder into an object.
– Iterate object in view.
– Use the magic KSS syntax.
26
28. Hardboiled Front End Development 10.06.2014edenspiekermann_
CSS Architecture
Sass enables:
– Modular file structure with @import globbing.
– Eliminating inconsistencies. Vars for colours, typographic rythm units,
breakpoints, animation durations.
!
Pitfalls:
– “Mixins” print content inside of rule. Duplicate content.
– “Extends” group selectors where used. Rules are moved out of intended
place, watch out for split CSS files.
– Slow compiling of too many files, in Rails. Use libsass.
28
30. Hardboiled Front End Development 10.06.2014edenspiekermann_
CSS Architecture
Tips:
– Helpful to prefix classes (“o-“, “l-“, “m-“), that way you recognize their
type in markup.
– Prefix JS hooks with “js-“. That way HTML/CSS restructuring doesn’t
affect javascript functionality.
– Use “is-” for dynamic states, induced by JS. For different kinds of states,
use BEM modifiers.
– Put all rushed code in shame.css. Always write reason of inclusion in
comments.
– Keep all z-index values in z-index.css and always use increments of 10 or
more.
30
35. Hardboiled Front End Development 10.06.2014edenspiekermann_
...!
!
<script src="jquery.js"></script>!
<script src="module1.js"></script>!
<script src="module2.js"></script>!
<script src="module3.js"></script>!
!
</body>!
</html>!
Breaking long script files into chunks
Alternative approach: Split & Include manually
– Too much manual labour.
– How do you handle common dependencies?
– Conflicts in the global object.
– Order of loading is important.
35
36. Hardboiled Front End Development 10.06.2014edenspiekermann_
define([
Breaking long script files into chunks
Better approach: Modularize everything
– Create a new file and define a module.
36
37. Hardboiled Front End Development 10.06.2014edenspiekermann_
define([!
"jquery",!
"jquery-ui"!
],!
function ($, jqueryUI) {!
Breaking long script files into chunks
Better approach: Modularize everything
– Create a new file and define a module.
– State its dependencies.
37
38. Hardboiled Front End Development 10.06.2014edenspiekermann_
define([!
"jquery",!
"jquery-ui"!
],!
function ($, jqueryUI) {!
!
var init = function (options) {!
//...implement logic!
};!
!
init(options);!
!
});!
Breaking long script files into chunks
Better approach: Modularize everything
– Create a new file and define a module.
– State its dependencies.
– Implement your logic.
38
39. Hardboiled Front End Development 10.06.2014edenspiekermann_
JS Module Creation Tools
– requireJS. http://requirejs.org
– Browserify. http://browserify.org
– Webpack. http://webpack.github.io
39
41. Hardboiled Front End Development 10.06.2014edenspiekermann_
module.exports = function(grunt) {!
!
// Load libs!
grunt.loadNpmTasks('grunt-watch');!
grunt.loadNpmTasks('grunt-jshint');!
grunt.loadNpmTasks('grunt-requirejs');!
!
// Project configuration.!
grunt.initConfig({!
pkg: '<json:package.json>',!
jshint: {!
options: {!
curly: true,!
eqnull: true,!
browser: true,!
sub: true,!
boss: true!
}!
}!
!
// Define task.!
grunt.registerTask('syntax',
['jshint:src']);};!
Automating tasks with Grunt (http://gruntjs.com)
Things you can do:
– Get immediate feedback on syntax errors.
– Live reload project.
– Minify, uglify, pack code.
– Also, use requireJS optimizer.
– libSass. Blazingly fast Sass compilation.
– Image compression.
–Control everything from one config file: gruntfile.js
!
– Alternative: Gulp (http://gulpjs.com). Lot of buzz lately.
41
42. Hardboiled Front End Development 10.06.2014edenspiekermann_
{!
"name": "Fontshop Relaunch",!
"version": "1",!
"dependencies": {!
"fittext": "",!
"jquery": "1.11",!
"underscore": "",!
"backbone": "",!
"backbone.wreqr": "",!
"backbone.marionette": "",!
"modernizr": "",!
"picturefill": "",!
"jquery-waypoints": "",!
"jquery-sortable": "",!
"OwlCarousel": "",!
"jasmine.async": "",!
"angular": "",!
"angular-chosen-localytics": "",!
"angular-local-storage": "",!
"ng-clip": "",!
"zeroclipboard": ""!
}!
}!
Manage Dependencies with Bower (http://bower.io)
Things you can do:
– Manage dependencies from one file.
– You can specify version of scripts.
– You can change folder (to fit your folder structuring).
!
Things you can’t do:
– Include in page automatically. Use requireJS for
that :).
42
43. A wee bit of JS frameworks & tools.
edenspiekermann_
44. Hardboiled Front End Development 10.06.2014edenspiekermann_
Backbone and Angular in Fontshop.
1. Backbone
– FS wasn’t an SPA. Used Backbone as a structuring tool for our JS modules.
– Helpful events object, this.$(“…”) selector, initializers.
– Create multiple instances easily.
– Enforces good OO practices.
!
2. Angular
– Used it in the tryout (http://next.fontshop.com/tryout) section.
– No boilerplate code.
– Provides one point of change (Model).
– Very quick to set functionality up.
44
45. Hardboiled Front End Development 10.06.2014edenspiekermann_
Some small favorite scripts :)
Backbone.wreqr (https://github.com/marionettejs/backbone.wreqr)
– True events based apps.
– Enable true modularity.
!
Waypoints (http://imakewebthings.com/jquery-waypoints)
– No more scrolling window, object, offset calculations.
– Also, sticky headers, easily done.
!
owlCarousel (http://www.owlgraphic.com/owlcarousel)
– Touch based (draggable).
– Responsive be default.
– Uses CSS 3D transforms, where possible.
!
45
46. berlin amsterdam san francisco stuttgart
edenspiekermann_
Thank you.
Spiros Martzoukos, Web Developer
tw @martzoukos
T +49 157 84340808
!
s.martzoukos@de.edenspiekermann.com
www.edenspiekermann.com