GithubHelp home page GithubHelp logo

dtan3847 / project-minichat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simplonco/project-minichat

0.0 0.0 0.0 2.09 MB

BlaBlaBlaBla BlaBla Bla :cat:

License: GNU General Public License v2.0

Makefile 1.86% HTML 68.93% JavaScript 29.21%

project-minichat's Introduction

MiniChat Project

The project is a Chat Web App; groups will be set randomly, you will use Firebase (a Remote Database based on AJAX Technology) and some CSS Preprocessors Less & Sass !

What you need is what you have already learned : HTML, CSS, JS and jQuery !

On the first day you will focus on the UX / UI Design of the app, and write some specifications (few mockup tools http://mashable.com/2012/06/07/mockup-tools/).

And finally you will have the total freedom to use plugins or framework (e.g.: Bootstrap or Foundation or Material Design Light).

Specifications Templates

Features

It's a chat, so you have to let people discuss together, of course:

  • First, make one big global channel, and after allow other channels like private discussions ;
  • Let users choose a pseudonym and maybe choose an avatar (check Gravatar) ;
  • Let people send Emoji Smiley, Links, Pictures, Youtube Videos, User Tags, etc.. (you will use REGEX) ;
  • Make everything looks great (with a lot of CSS) and don't forget the app has to be responsive—think about how it will look on mobile devices!

Design

Here's some advice and a few tricks to help you to work together on the same project code.

First, work with the whole team on global design; next, split the team between, for example, Backend and Frontend developers. A good idea is to use a demo function, e.g.:

/* DEMO FUNCTIONS */

var sendMessage = function (message) {
    console.log("DEMO: sendMessage: " + message);
};

var retreiveMessages = function () {
    var messages = [
        { pseudo: "Roméo", message : "Ô Roméo ! Roméo ! pourquoi es-tu Roméo ? Renie ton père et abdique ton nom ; ou, si tu ne le veux pas, jure de m’aimer, et je ne serai plus une Capulet." },
        { pseudo: "Juliette", message : "Dois-je l’écouter encore ou lui répondre ?" }
    ];
    console.log("DEMO: retreiveMessages :" + messages);
    return messages;
};

The purpose is to start to code the interface and test using these functions and at the same time another member of the team can work on the function to make them work with real data.

Here is the Javascript code example given on the official Firebase website:

// Create a connection to your Firebase database
firebase.initializeApp({
    apiKey: "<FIREBASE-API-KEY>",
    authDomain: "<FIREBASE-DOMAIN>.firebaseapp.com",
    databaseURL: 'https://<FIREBASE-DOMAIN>.firebaseio.com/'
});
var myFirebaseRef = firebase.database().ref('/');
// Save data
ref.set({ name: "Alex Wolfe" });
// Listen for realtime changes
ref.on("value", function(data) {
    var name = data.val().name;
    alert("My name is " + name);
});

Firebase has a realtime update design, so you can replace the retreiveMessages function with just an updateConversation function that will update the content of the conversation and will be called in the ref.on method, and of course sendMessage will use ref.set.

Ressources

REGEX (REGular EXpressions)

For example: :smile_cat: will be replaced by <img src="graphics/emojis/smile_cat.png" />.

AJAX

project-minichat's People

Contributors

yvan-sraka avatar haroenv avatar dtan3847 avatar

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.