Code Monkey home page Code Monkey logo

xcomponents's Introduction

XComponents

XComponents is a set of AngularJS directives that allow you to quickly create a basic app using Cards and Lists. It is built on top of the Bootcards UI framework, giving a near-native look on iOS and Android. It's intended to help AngularJS developers create responsive and mobile-first applications, faster.

These applications can be used with most modern PC and mobile browsers. For delivery through mobile app stores for Apple iOS and Android devices, XComponents uses Cordova. XComponents apps can support any back end that can provide a suitable REST API, including MongoDB, Microsoft SQL Server, PostgreSQL and IBM Domino 9.x with Domino Access Services.

XComponents follows some simplifying design principles:

  1. Card-based user interface User interfaces are built from a consistent set of high level objects - Cards and Lists These Cards and Lists are rendered by the framework in an optimized way for the device at hand. As a result, developers need to write much less user interface adaptation code.

  2. Integrates with Bootstrap With the XComponents, Card and List user interface objects are built with Bootstrap, using the Bootcards framework. Twitter Bootstrap is the most popular and widely used responsive web design framework. Use the responsive framework that you already know and love - Bootstrap.

  3. Support for online and offline modes With XComponents, developers can create apps that can work either online or offline. XComponents supports the LowlaDB mobile engine for offline-capable apps, and other local JSON datastores. Create your app once using XComponents and Javascript, then run it online or offline with the same front end source code.

xcomponents's People

Contributors

markleusink avatar rossmc7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xcomponents's Issues

Can’t find variable: MutationObserver in Safari Browser compatibility

When accessing the app from Safari via windows, mac, or ios, the resulting error is: Can’t find variable: MutationObserver in Safari Browser compatibility.

I've included a screenshot from your demo.xcomponents.org website showing the error:
image

An additional screenshot showing the app running locally (non minified version of HTMLImports.js):
image

please advise work around.

Thanks.

Add extra routing

In our applications, we need to make sure the user is authenticated before requesting data from our API. In our existing templates we use this approach:

var myApp = angular.module('myApp', [
  'ngRoute',
  'ngCookies', 
  'myApp.login',
  'myApp.home',
  'myApp.mission',
  'myApp.newdocument',
  'myApp.version',
  'dbviewerServices',
  'dbviewerFilters', 
  'textAngular'
]).
config(['$routeProvider', function($routeProvider) {
  $routeProvider.
    otherwise({
      redirectTo: '/home'
    });
}]).
run(function($rootScope, $location, $cookieStore) {
  // register listener to watch route changes
  $rootScope.$on("$routeChangeStart", function(event, next, current) {
    if ($cookieStore.get('apikey')){
      $rootScope.apikey = $cookieStore.get('apikey');
      $rootScope.user = $cookieStore.get('user');
    }
    if ($rootScope.apikey == null) {
      // no logged user, we should be going to #login
      if (next.templateUrl == "/login/login.html") {
        // already going to #login, no redirect needed
      } else {
        // not going to #login, we should redirect now
        $location.path("/login");
      }
    }
  });
});

The full source code for our demo app can be seen here: https://github.com/ldcvia/ldcvia-teamroom/blob/master/app/app.js

Some way of defining our own $routeChangeStart event would be great.

Loading data and filtering - performance issues with > 10K list entries

I have a table with 15K rows in a mysql database; I can query the table directorly with mysql and get a response in ~.4 ms, while a GET call to the strongloop API to fetch the elements in the list takes ~4 seconds (either with curl or a browser).

A similar table with 1.5 K rows has perfectly acceptable performance.

Similarly, the filter for the list is almost unusable with this much data; I get stutters and pauses entering every character. (This is more understandable - and might be fixable with something like a sleep or delay so that filtering doesn't begin until the user stops typing into the input box - it's really just a user perception issue.)

Do you have any tips for managing large lists of data without sacrificing performance? I'd be happy to implement some sort of lazy loading or row streaming, but I'm not sure where to begin hacking, or if anyone has tried a list with this much data before.

Test

Test. Pls ignore.

Ability to add HTTP Headers to REST requests

For us to use XComponents we need to be able to pass an HTTP Header on all REST API requests. This header is used to authenticate the request.

In xcomponents.js this can be achieved by editing the $http calls like so:

...
return $http.get(url, {
  headers: {
    'apikey': 'USERKEYGOESHERE'
  }
}).then( function(res) {
...

bower_components2 error

Followed the instructions on xcomponents.org to build a new application. When I accessed the app for the first time there were several 404 errors. Several were due to a path of bower_components2 being used rather than bower_components.

Standard way to populate combo box options dynamically

A common requirement of applications is that combo boxes have their options list populated based upon dynamic data (e.g. categories in a discussion application).

Making this configurable in XComponents would be great.

Missing xcomponents/css/style.css

Following the instructions from xcomponents.org to build a new application, I get a 404 error when trying to load the CSS file "xcomponents/css/styles.css"

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.