Git Product home page Git Product logo

mojo's People

Contributors

jbueza avatar julienescueta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mojo's Issues

Separate out Service Locator from Mojo Core.

Let's make it resuable in other clients, such as, mobile web projects, Windows 8 projects, tablet/mobile (PhoneGap) projects.

The main thing here is that using a Service Locator is a great programming pattern and it shouldn't force a developer to have Mojo as a dependency just to use it.

Integrate uglifyjs and remove Ant/YUI Compressor

In order to make things easier, we can rejig the way we're doing compression/concatentation in a shell script or batch file.

We want to move away from Java being a dependency to generate the distribution files for Mojo Core.

Attach a node to the context element everytime a Service is invoked

Investigation

In order to make testing easier in Selenium UI, there is a request from the RESAAS engineering team to have it so that everytime a Service is invoked within a Controller's delegate, we seed a node with data attributes.

This will alleviate race conditions inherent in Selenium UI's assertions on asynchronous / reactive events.

Example Controller

ServiceLocator.getService("Registration").invoke(params, this.Register, this);

In the above line of code, if we're passing a reference to the current Controller, we'll be able to access the Controller's context element within the invocation of the Service. Inside the callback for success (usually handled by jQuery or Zepto), we can then seed an element with the proper meta information.

Solution

Option 1: Don't use Selenium UI

Due to its flakiness in observing UI changes through Wait()s, perhaps this is not the tool for doing end-to-end user interface tests. We can definitely look at PhantomJS instead but lose out on Internet Explorer automation.

Option 2: Seed an HTML element

We can seed an HTML node with meta information in regards to the context of the service call

Tests

NameDescription
Seed(context, params, callback) Should exist
Seed(context, params, callback) Should return false if context is null
Seed(context, params, callback) Should return false if `params` is not passed
Seed(context, params, callback) Should return false if `params` is not an object
Seed(context, params, callback) Should return false if callback not a function
Seed(context, params, callback) Should invoke the `callback` when passed into Seed()

Add helper functionality

Problem

Instead of having to paste code from the internet or have a jQuery plugin, why don't we just add it to the helper namespace?

Solution

  • Add new js file called "Helper.js"
  • Add new functions into mojo.helper.*
  • Rebuild mojo core through grunt (mojo.js and mojo.js.uncompressed.js)

Estimate: 1h

Tests

isEmail

Provides an easy way of determining whether an email is RFC 2822 compliant.

Name               Description        
isEmail(value)  Should return false if value is null 
isEmail(value)    Should return false if value is not a string

isUri

Name               Description        
isUri(value)  Should return false if value is null 
isUri(value)    Should return false if value is not a string

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.