This document discusses using React with Rails to add interactivity and improve performance over traditional Rails development with full page refreshes. It explains that React uses reusable components with immutable data to render views, and integrates well with Rails by allowing components to be rendered on the server for SEO. The react-rails gem handles mounting React components and cleaning up references to prevent memory leaks when used with Turbolinks. Overall React is presented as a good solution for progressive enhancement of Rails applications with JavaScript.
Predicting the future is hard and it requires a lot of assumptions, also known as beliefs, also known as faith. In “Assumptions: Check yo self, before you wreck yo self” we explore the consequences of beliefs when constructing predictive models. We’ll walk through the process of developing a demand forecast for Evo, a Seattle-based outdoor recreation retailer, and discuss how assumptions influence the behavior of your application and ultimately the decisions you make.
- AngularJS is a Model-View-Controller framework that can be used to build dynamic single-page applications for WordPress. - It uses bindings to connect views (HTML) to controllers, allowing real-time updates as data changes. Data binding is done through directives like ng-model, ng-repeat, etc. - The $http service provides an easy way to connect Angular models to REST APIs, like the WordPress REST API, to fetch and save data from the backend. This allows building apps that interact with WordPress remotely. - Additional topics covered include using controllers, building reusable components with directives, and ways to customize the WordPress REST API to fit the needs of Angular applications
The document discusses the differences between the traditional Web and the Semantic Web. The traditional Web links documents together through hyperlinks, while the Semantic Web links data using URIs and RDF. On the Semantic Web, resources are described through multiple representations including graphs of RDF data. Scripting can be used to build applications that retrieve and process Semantic Web data from multiple sources using the HTTP protocol and convert it to and from RDF. This merges the traditional Web and Semantic Web into a single Web.
The document discusses various methods for consuming web services using PHP, including REST, SOAP, and specific examples using Flickr, Delicious, and eBay APIs. REST uses HTTP requests and XML responses, while SOAP encapsulates requests and responses in XML for platform independence. Examples demonstrate using PHP with SimpleXML to parse REST responses, as well as the SOAP extension to call SOAP APIs and handle authentication.
The document discusses three APIs - NSUserActivity, CoreSpotlight, and web markup - that app developers can use to make their app content searchable on iOS devices. It provides details on how to index app data, activities, and web content to improve discovery and bring users into the app via search and Siri suggestions. Best practices are covered such as supporting deep links, using descriptive attributes, and optimizing the app launch experience from search results. Known issues with some search integration features are also mentioned.
The document discusses various ways to add custom rewrite rules in WordPress, including: 1) Adding rewrite rules indirectly by registering post types and taxonomies; 2) Adding rewrite tags and rules directly using add_rewrite_tag() and add_rewrite_rule(); 3) Adding endpoints using add_rewrite_endpoint() to route URLs with additional path segments; 4) Adding permastructs using add_permastruct() to define custom URL structures. The document provides examples of validating rewritten URLs, generating custom templates, and serving special templates for rewritten content. It emphasizes the importance of flushing rewrite rules after adding or changing them.
The document discusses 10 steps to make a Django site more responsive by adding a REST API and using AngularJS for the front-end: 1) Create an API endpoint for the Django models, 2) Set up the JavaScript environment and install AngularJS, 3) Create a static AngularJS site, 4) Use verbatim tags to avoid conflicts between Django and AngularJS variables, 5) Connect AngularJS to the API, 6) Take advantage of the Django REST Framework features, 7) Handle asynchronous data loading, 8) Add forms and POST requests, 9) Clean up settings.py, and 10) Document the API. The goal is to keep the back-end lightweight Django while building a more responsive and
A talk delivered to the Philadelphia Python User Group on 09/17/15 Models form the backbone of most Django sites. They contain the fields and behaviors of the data your site is using. The proper planning and implementation of models is one of the first steps to creating powerful and reusable Django apps. It’s also crucial for avoiding pitfalls and complex workarounds down the line. In this talk you’ll hear about: - • Django model fields and methods • Model inheritance • Relational databases • Migrations • How to access the data stored within your models
This document provides an overview of hardcore URL routing in WordPress. It discusses how URLs get routed through rewrite rules and patterns, and various functions and hooks in the Rewrite API that can be used to add custom routes. These include registering post types and taxonomies, adding rewrite rules and tags, validating taxonomy terms, and adding endpoints and permastructs. It emphasizes the importance of flushing rewrite rules when making changes.
Lightning talk at the Code4Lib British Columbia meeting on 27 November 2014, presenting a jQuery plugin for adding unAPI visibility (and cats!) to library catalogs.
Swift on Linux is finally there. What about building your next big coding project in Swift instead of Rails or node.js?
This document discusses converting Django apps into reusable services. It begins by explaining the typical structure of a Django project with multiple apps. It then discusses some of the challenges with this monolithic structure in terms of reusability, scalability and maintainability. The document proposes converting apps into reusable services with defined contracts for communication. It provides examples of defining API endpoints and authentication. Converting apps to services allows for improved reusability as apps can be developed and updated independently. It also enables better scalability by removing dependencies between apps.
Presentation given at 2013 LITA Forum on Nov 8, 2013. http://www.ala.org/lita/conferences/forum/2013 ; Example files are at http://github.com/bohyunkim/examples
In this talk I explore just how much code you can share between a react web project and a react native project.
Long ago, in the late days of the first Internet boom, before jQuery, before Underscore, before Angular, there was a web application built by a large corporation. This application was written as a server-side application using server-side technology like Java or PHP. A tiny seed of JavaScript was added to some of the pages of this application to give it a little sizzle. Over the ages, this tiny bit of JavaScript grew like kudzu. Most of it was embedded in the HTML in
Avoid misery of working with legacy code We will see how you can add independent and isolated components to existing pages; pages that may be difficult to change React and Flux allow you to make self-contained additions that handle their own data access/persistence
Backbone.js presentation at JSDay 2011: http://www.jsday.it/2011/archive/talk/a-little-backbone-for-your-app
Philip Poots is a Ruby developer who works at Audacio.us. He focuses on structure frameworks, state applications, and speed with JavaScript.
Javascript and first-class citizenry: require.js & node.js Javascript on web pages is ubiquitous and its problems are legendary. Javascript, seen as a second-class code citizen, is usually hacked together even by seasoned developers. New libraries (jQuery, prototype, backbone, knockout, underscore) and runtime tools (firebug, jasmine) look like they solve many problems - and they do. But they still leave poorly written code as just that. One key problem is that all javascript code lives globally and this results in poorly managed, tested and delivered code. In this session, I will illustrate that we can treat javascript as a first-class citizen using with require.js and node.js: it can be modular, encapsulated and easily unit tested and added to continuous integration cycle. The dependencies between javascript modules can also be managed and packaged just like in C# and Java. In the end, we can resolve many javascript difficulties at compile time rather than waiting until runtime.
When you move beyond adding simple enhancements to your website with jQuery and start building full-blown client-side applications, how do you organize your code? At this month's Triangle JS Meetup, we'll take a look at patterns for application development using jQuery that promote the principles of tight encapsulation and loose coupling, including classes, the publish/subscribe paradigm, and dependency management and build systems.
This document provides an overview of using the Backbone.js framework for client-side MVC applications. It discusses why Backbone is useful for structuring JavaScript applications, its core architecture including models, collections, views and routers. It also provides examples of how to convert jQuery code to use a Backbone-based approach and lists some real-world applications that use Backbone.
This document discusses using jQuery and Google App Engine to create cross-domain web mashups in 3 sentences or less: The document introduces techniques for creating cross-domain web mashups using jQuery to make AJAX calls across domains and Google App Engine for hosting, discussing JSONP and proxies to overcome the same-origin policy limitation. It then provides an example mashup that displays tweets tagged with a hashtag on a map by geocoding hashtag names to locations and querying Twitter, Google Maps, and other domains.
This document discusses cross-domain mashups using jQuery and Google App Engine. It describes common techniques for dealing with the same-origin policy, including proxies, JSONP, and building sample applications that mashup Twitter data, geotagged tweets, and maps. Examples include parsing RSS feeds from Twitter into JSONP and displaying tweets on a map based on their geotagged locations. The document concludes by noting issues with trust, failures, and limitations for enterprise use.
The document discusses Handlebars, a templating language for HTML. It can be used to render dynamic HTML views from JSON data sources by using templates with placeholders that are replaced by values from a context object. An example demonstrates creating a template, compiling it, providing a context with sample data, and rendering the template to insert the dynamic HTML into the page. Handlebars allows separation of design and data for model-view-controller applications.
An introduction to modern web technologies HTML5, including Offline, Storage, and Canvas Embedded JavaScript RESTful WebServices using MVC 3, jQuery, and JSON Going mobile with PhoneGap and HTML and CSS
This document discusses building mobile applications using PhoneGap, jQuery, and Dreamweaver. It provides an overview of different mobile application types including mobile HTML, web apps, hybrid apps, and native apps. It then demonstrates how to create hybrid mobile apps with PhoneGap and jQuery Mobile, including accessing device APIs, building user interfaces with jQuery Mobile, and creating customizable PhoneGap plugins.
This document discusses building mobile applications using PhoneGap, jQuery, and Dreamweaver. It provides an overview of different mobile application types including mobile HTML, web apps, hybrid apps, and native apps. It then demonstrates how to create hybrid mobile apps with PhoneGap and jQuery Mobile, including accessing device APIs, building user interfaces with jQuery Mobile, and creating lists and charts with JavaScript plugins. It also covers how to package and deploy the app to different platforms using PhoneGap.
This document provides an overview of dependency management with RequireJS. It defines key concepts like modules, AMD, and RequireJS. It demonstrates how to define modules, request dependencies, and configure RequireJS. It also covers more advanced topics like defining constructor modules, configuring paths and shimming non-AMD libraries, using plugins, conditional dependencies, error handling, and optimization.
This document discusses various tools and libraries for building real-time web applications, including SuperClass for simple class abstraction, SuperApp for building state-based applications, SuperModel for object-relational mapping, SuperConnect for templating and binding, SuperRPC for JSON-RPC, and Juggernaut for real-time functionality through websockets. It also briefly mentions other utilities like Sprockets for asset packaging and FileReader for reading file uploads.
The document discusses using JavaScript to style components instead of CSS. It describes how React allows defining styles inline but that is not ideal. The author explores using Webpack and React-style to define styles within components in JavaScript and have them automatically output to a stylesheet. This avoids separating styles across files while keeping styles tightly coupled to components. The document argues JavaScript is well-suited as a "preprocessor" for generating styles and provides examples of using variables, functions and loops to generate styles programmatically.
React.js has taken the web development world by storm, and for good reason: React offers a declarative, component-oriented approach to building highly-scalable web UIs. But how can we take advantage of a JavaScript library like React in our server-side PHP applications. In this talk l cover the different ways React.js can be integrated into an existing PHP web application: from a client-side only approach to multiple techniques that support full server-side rendering with a Node.js server or PHP’s v8js. I also discuss the trade-offs in each of these designs and the challenges involved with adding React to a PHP site. Most importantly, I consider the higher-level issue of how to improve view cohesion across the client-server divide in a PHP application.
This document discusses how big data and analytics can be used by individuals. It notes that while people used to be able to work alone, big data now requires teams of people. It provides examples of how a team of 1 person grew to 4 people and later 10 people to work on an analytics project over 3 months. It also discusses technologies like REST APIs, Java, RequireJS, Mustache templates, and how they were used to develop applications and widgets to work with and visualize different data sources.
The document discusses the evolution of the author's views on JavaScript and front-end frameworks. It begins by expressing dislike for JavaScript but acknowledging the need for it. Various frameworks like Backbone, Angular, and Ember are explored but found lacking. React is then introduced and praised for its declarative and composable approach similar to HTML. The author comes to understand JSX and how React implements unidirectional data flow to separate the UI from data logic. This allows building full-stack applications with React handling both client and server rendering based on shared intentions, state, and data flow patterns.
Pre-trained Large Language Models (LLM) have achieved remarkable successes in several domains. However, code-oriented LLMs are often heavy in computational complexity, and quadratically with the length of the input code sequence. Toward simplifying the input program of an LLM, the state-of-the-art approach has the strategies to filter the input code tokens based on the attention scores given by the LLM. The decision to simplify the input program should not rely on the attention patterns of an LLM, as these patterns are influenced by both the model architecture and the pre-training dataset. Since the model and dataset are part of the solution domain, not the problem domain where the input program belongs, the outcome may differ when the model is trained on a different dataset. We propose SlimCode, a model-agnostic code simplification solution for LLMs that depends on the nature of input code tokens. As an empirical study on the LLMs including CodeBERT, CodeT5, and GPT-4 for two main tasks: code search and summarization. We reported that 1) the reduction ratio of code has a linear-like relation with the saving ratio on training time, 2) the impact of categorized tokens on code simplification can vary significantly, 3) the impact of categorized tokens on code simplification is task-specific but model-agnostic, and 4) the above findings hold for the paradigm–prompt engineering and interactive in-context learning and this study can save reduce the cost of invoking GPT-4 by 24%per API query. Importantly, SlimCode simplifies the input code with its greedy strategy and can obtain at most 133 times faster than the state-of-the-art technique with a significant improvement. This paper calls for a new direction on code-based, model-agnostic code simplification solutions to further empower LLMs.
In May 2024, globally renowned natural diamond crafting company Shree Ramkrishna Exports Pvt. Ltd. (SRK) became the first company in the world to achieve GNFZ’s final net zero certification for existing buildings, for its two two flagship crafting facilities SRK House and SRK Empire. Initially targeting 2030 to reach net zero, SRK joined forces with the Global Network for Zero (GNFZ) to accelerate its target to 2024 — a trailblazing achievement toward emissions elimination.