GithubHelp home page GithubHelp logo

writings's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

writings's Issues

run exercises with lamp?

EDIT:
this is worked out - the server/node part was confusing, and by the time the example code was compensated for a traditional setup vs. the js server, your code examples were changed and i was missing the point/benefits of the exercise.

now it's just throwing the response back in an echo and the example code stays in tact.

nice work - thank you.

-------original message below:------
don't have express installed.
wanted to follow along.
do you have instructions for setting up in localhost/wamp (w/o node)?
thanks for making this post/app.

Let's use a model - error callback called

In this stage: https://github.com/kjbekkelund/writings/blob/master/published/understanding-backbone.md#lets-use-a-model

Following code:

var Statuses = function() {};

Statuses.prototype.add = function(text) {
  var status = new Status();

  // DOCS: http://documentcloud.github.io/backbone/#Model-save
  status.save({text : text}, {
    success: function(model, data) {
      console.log("success callback");
      events.trigger('status:add', data.text);
    }, 
    error : function(model, xhr, options) {
      console.log("error callback");
      console.log(model);
      console.log(xhr);
      console.log(options);
    }
  });
};

Causes error callback to be called, not really sure why... Here is the full source: https://gist.github.com/stefek99/ccdb3dd2e40e5e656805

I know that this is just a step in a tutorial and probably can be skipped however I would really like to know why it isn't working at this stage.

Thanks for help in support, great piece of writing BTW :)

help - how to get data from json like this:

var search = $("#username").val();

$.ajax({
    url: 'https://coderwall.com/' + search + '.json?callback=?',
    dataType: "json",
    timeout: 5000,       
    success: function (data) {

        $.each(data, function (key, val) {

            var username = val.username;
            var name = val.name;
            var location = val.location;
            var github = val.accounts.github;
            $('#result').append('<h1>' + name + '</h1>');
            $('#result').append('<h2>' + location + '</h2>');
            $('#result').append('<p>Github account: <a href=https://github.com/' + github + ' target=_blank>' + github + '</a></p>');

            $.each(val.badges, function (key2, val2) {
                var badge_name = val2.name;
                var badge_desp = val2.description;
                var badge_img = val2.badge;
                $('#bimg').append('<li class="bassdge"><figure><img src=' + badge_img + '/><figcaption><p id=despt >' + badge_desp + '</p><b class=name>' + badge_name + '</b></figcaption></figure></li>');                       

            });

        });
    },
    error: function (data) {
        alert('Username does not found');
    }
});

[UnderstandingBackbonejs] Validating with server

Hello,
I have read with great interest your article, and Backbone is a lot clearer for me, thanks !

I was testing the code when it occured to me that the final code is not the complete mirror of the Jquery/AJAX version, as the backbone version uses the model text variable, while the former uses what comes from the server. (I found out when my server crashed and the content was still displayed.)

Am I correct or have I misunderstood something ?

Thanks you,
Nathan

litle formating thing

at around "We do the same with NewStatusView:" in step-by-step-modules.md this line in the following code block

, 'modules/status/newStatusView'

should be green, or?

Use HTML template

In this example, doing html generation via JS seems ok because there is so little of it, but in a larger project, something like mustache (or even the _ template) becomes much more necessary. It might be worth making use of templates in the this tutorial.

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.