Coder Social home page Coder Social logo

coll-net's Introduction

Collnet

College networking

This is going to be fun!

Todo

  • Edit Profile
  • Institute profile pages
  • Search Companies
  • Company profile pages
  • Enroll institute
  • Join Company
  • Students of :institute
  • Employees of :company
  • Show posts
  • Create posts
  • Create comments
  • Groups/Filters of posts
  • Use date picker
  • Use select tags to maintain consistency
  • Search for employees/students/institutes/companies etc
  • Delete/edit post
  • Delete/Edit comments
  • Delete Profile
  • Edit/Delete institute
  • Edit/Delete company
  • Images
  • Social integration

coll-net's People

Contributors

akanshi avatar ayush2505 avatar bogas04 avatar chitra17 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

aryaastha

coll-net's Issues

m_user doesn't have properties to show user details.

Desired AbcModel blueprint is as follows :

class AbcModel {
  private $property1; // Anything required internally, like $userCollection etc
  public $property2; // Anything which controller can directly see and change
  function __construct() {
    // this should call constructors based on param count 
    // Refer to : http://php.net/manual/en/language.oop5.decon.php#99903
  }
  // followed by constructors 
  public function save() { 
    // saves the model into db
  }
  public function retrieve() {
    // gets the model from db using $email or $_id, either of which would be set 
    // in case of UserModel. NOTE : no params
  }
  public function exists() {
    // boolean based function
  }
  public function delete() {
    // deletes using $email or $_id, either of which would be set in case of UserModel
  }
  public function create($array_of_details_of_the_model_to_be_saved) {
    // saves on the basis of the given array, throws exception in 
    // case of error and finally fills the properties of the class for use
  }
  public function set($array_of_details) {
    // Takes the array and sets all the public fields like name etc, if present in the array
  }
}

Types of constructors :
A controller should be able to do the following

$user = new UserModel($email, $pass); // This constructor would authenticate, or throw exception 
echo $user->name; // This should give the name (no need to retrieve user)
$user = new UserModel($email); // This constructor should fetch user details
// but hide sensitive data like pass. Such a model is immutable, 
// ie we can only read but not write anything in it.
echo $user->email; // This should give the email of user
$user = new UserModel(); // An empty user model is created
$user->create([
  "email" => "[email protected]",
  "password" => "unhashed password",
  "name" => "Some One",
  "gender" => "male"
]); // Creates a new model and saves it.
// This should verify , hash the password and create a user. 
$user = new UserModel($email, $pass);
$user->name = "Someone Else";
$user->save(); // This should save the above made change
$user = new UserModel($email); // Immutable object 
$user->name = "Someone Else";
$user->save(); // This should throw an exception as the model 
// isn't authenticated to make such changes.

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.