Skip to content

Code is getting ugly again... #4

Open

Description

@formula1

I think I may want to start bringing in async as a clientside dependency as well. However, that in turn increases the size of the api which already takes about 500 ms to load (far longer than it should)

Activity

  1. piranna commented on Feb 28, 2015

    @piranna
    Collaborator

    However, that in turn increases the size of the api which already takes about 500 ms to load (far longer than it should)

    I think Angular is culprit here, I would have done it in raw Javascript or maybe plain jQuery since mostly it's a XHR and we are not using dynamic binding, only client-side templating that could have been done with mustache or any other Javascript templating, but maybe better HTML Template tag that it's already supported by all current browsers except Internet Explorer.

    By refactoring the web app by using standard XHR and HTML Templates instead of Angular, it will need more work but page size will drastically decrease and code will be easier to understand and maintain :-)

    (Disclaimer: I'm honestly not an Angular developer, the few things that I've done showed me there's too much magic there for someone that likes to work low level and baremetal... ;-) )

  2. formula1 commented on Mar 3, 2015

    @formula1
    OwnerAuthor

    I was thinking about just in jQuery however went with angular as its the standard for One app pages.

    That being said, I definitely have no problems removing the dependencies on it. It probably would be easier to maintain.

    Alright

    • +async
    • -angular
  3. piranna commented on Mar 3, 2015

    @piranna
    Collaborator

    That being said, I definitely have no problems removing the dependencies
    on it. It probably would be easier to maintain.

    👍

    +async
    -angular

    Are you talking about async.js (the library for parallize code), or about
    any other thing?

  4. formula1 commented on Mar 3, 2015

    @formula1
    OwnerAuthor

    async.js parallize code. Though I'm currenlty using it as series

    https://github.com/formula1/NodeOS-Blog/blob/master/html/footerjs/cacheOrLoad.js

    The callback api is a bit ugly, however for now I'll leave it as is. I'm doing Item callbacks to reduce the amount of iterations done.

    I probably want to delete everything in memory after I use it as well, however outside of that this can be somewhat closed

    I'm not using the template tag due to ie, however, what I'm doing is basically the same thing

    Btw, I created a big header at the top for europe ;) But obviously that is better off a little smaller.

    We can also have a setting to turn of cached requests if you want. So that it becomes optional

  5. formula1 commented on Mar 3, 2015

    @formula1
    OwnerAuthor

    On an obvious note, caching results also speeds up the page a ton.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions