Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 28

Thread: Web framework

  1. #11
    Junior Member
    Join Date
    Aug 2011
    Gender
    Male
    Posts
    133

    Default Re: Web framework


    I have a confusion because this is not what I usually do.

    Suppose I have 2 php files: fileA.php, and fileB.php
    And I have 1 class file: myClassFile.php

    in fileA.php, I need to instantiate a MyClass class:

    Code:
    ...
    myObject = new MyClass();
    ...
    in fileB.php, I need to use the myObject object created in fileA.php.

    1. How would I do that?

    Is the best way using sessions?

    Code:
    $_SESSION["my_object"] = myObject;
    or are there better ways?

    ----------------------------------------

    2. Suppose I don't use solutions similar to the above.. Will myObject in fileA.php be lost (destroyed, or freed) when the user proceeds to fileB.php? That is, will there be no more reference to myObject in fileB.php?

  2. #12

    Default Re: Web framework

    Yes. Pero unsa man nga framework imung nagamit na (any language will do)? And what can you say sa mga frameworks nga imung nagamit na (on any web you have developed).
    I'm suggesting PHP/CodeIgniter because this is what I use most often when asked to do websites. If given a choice, I would go this route. _Always_. This way it's not too verbose that you get bored coding the basics yet it's not too abstract that you still have full control of your app.

    I've been using CI for 2 years now and I've never looked back since. In terms of benchmarks, scalability and footprint. CI pretty much owns the rest.

  3. #13

    Default Re: Web framework

    ..akung advice r jud sa mga beginners start jud mu sa scratch e master usa na ninyo after mu decide ug gamit ug cms karon..

  4. #14

    Default Re: Web framework

    Quote Originally Posted by NNNN View Post
    Unsa imung pasabot make from scratch? Mag-himo ko without framework or mag-himo ko from scratch using a framework? Actually, I want an answer similar to that of bryanarzaga.. But I want it based from your experience. Any language will do..
    ill define it first, first i dont consider PHP as a framework (IHMO)

    yes, create it from a scratch as in you build it from ground-up, using only PHP and shear-guts... i frown upon those MVC framework, first its open-source, everyone has access to the codes, including script-kiddies...

    when i built my own framework it started from a frustration and limitations i encounter while developing using opensource system like wordpress, joomla, drupal, oscommerce, magento, codeigniter,cakephp

    so i decided and challenge myself to create one, having experienced working on a Social Network framework that we build, i journeyed in creating my own modular/versatile framework, that has all the goodies on wordpress,.joomla,oscommerce,magento combined ... its been used already by 3 websites

    yeah, open-source framework/MVC is good it speed up development time, but nothing beats doing the development the old-fashioned way...

    im planning to put mine in limited use only to avoid getting to script kiddies...

    currently im scaling down my framework to make it lighter and load faster

    again, always consider depende ra sa imo need... if you feel creating one will give all the need you WANT go for it, but if you can make do on other open-source solution then go for it.
    Last edited by salbahis; 11-18-2011 at 04:29 PM.

  5. #15

    Default Re: Web framework

    CodeIgniter

  6. #16

    Default Re: Web framework

    Quote Originally Posted by bryanarzaga View Post
    Comparison of Web application frameworks - Wikipedia, the free encyclopedia

    just look at the data and decide which fits your needs..
    ^ I agree with this point. The question thrown was "What do you think is the best framework for web development?". And my answer is there is none. There are certain situations and requirements that suites or complements a particular framework, technique or the language themselves.

    Analyze your requirements and then research for a technique or a framework that'll suite it.

  7. #17

    Default Re: Web framework

    Quote Originally Posted by salbahis View Post
    paghimo nalang from scratch... kay mas ma familiarize pa nimo ug maayo...

    i made one myself kay way ayo ang mga opensource kay public ang code niya...
    Yes and No there bro.. Yes mafamiliar ka sa code kay ikaw ga himo. but why bother reinvent the wheel when there are those frameworks that have undergone what you've already trying to do. Writing from scratch is ok if you have the manpower, and the time to do it. If you are into RAD (Rapid Application Development) then you'd better stick to a framework.

    Regarding the opensource == public ang code.. I don't see the relevance in this. if public ang code then makita ang flaws. if makita ang flaws then ma fix dayon.. unlike closed source nga gamay ra ang mag tinabangay og pa harden sa code kay gamay ra ang naay access. diba @bryanarzaga?

  8. #18

    Default Re: Web framework

    Quote Originally Posted by b3rx View Post
    Yes and No there bro.. Yes mafamiliar ka sa code kay ikaw ga himo. but why bother reinvent the wheel when there are those frameworks that have undergone what you've already trying to do. Writing from scratch is ok if you have the manpower, and the time to do it. If you are into RAD (Rapid Application Development) then you'd better stick to a framework.

    Regarding the opensource == public ang code.. I don't see the relevance in this. if public ang code then makita ang flaws. if makita ang flaws then ma fix dayon.. unlike closed source nga gamay ra ang mag tinabangay og pa harden sa code kay gamay ra ang naay access. diba @bryanarzaga?
    i think wala pa nimo na experienced nga naay flaw nakit-an ang mga script-kiddies pero ang developer sa framework wala... ive experienced it couple of times na na hack ang site kay wala na fix dayon sa developer sa framework... then i have to do the patch myself......

    there lot of script-kiddies targeting opensource framework... check google he knows

  9. #19

    Default Re: Web framework

    Quote Originally Posted by NNNN View Post
    I have a confusion because this is not what I usually do.

    Suppose I have 2 php files: fileA.php, and fileB.php
    And I have 1 class file: myClassFile.php

    in fileA.php, I need to instantiate a MyClass class:

    Code:
    ...
    myObject = new MyClass();
    ...
    in fileB.php, I need to use the myObject object created in fileA.php.

    1. How would I do that?

    Is the best way using sessions?

    Code:
    $_SESSION["my_object"] = myObject;
    or are there better ways?

    ----------------------------------------

    2. Suppose I don't use solutions similar to the above.. Will myObject in fileA.php be lost (destroyed, or freed) when the user proceeds to fileB.php? That is, will there be no more reference to myObject in fileB.php?
    Although off topic na ni, i will try to answer.
    Just a bit of typo, ang imong 'myobject' needs a '$' para ma consider na variable/object siya.
    Consider that lahi ang architecture sa web og sa desktop na oop. Correct if i am wrong ang objects sa php ni live ra throughout sa usa ka request, another request lahi nasd to unless gi store sa session or si serrialize something. but di ko mo suggest ug putting the object sa session kay kung mo dako ang object, mo kamang jud na imo application.

    1) question sad ko, unsa na imo files, sa usa ka request na or 2 ka separate? if usa ra then you could include fileA.php in fileB.php

    2.) same question as number, if usa ra ka request na, and you do by including fileA.php in fileB.php then dili mawala but if separate na request (kanang mo load ug lain na sub url ba) then mawala jud na. and as what i have said session or serrialization or even putting it in the db then query it again mao ray ways para ma retrieve to nimo

  10. #20

    Default Re: Web framework

    Much better start from a scratch then kung familiar naka sa code adto na pagstart og learn og CMS like wordpress, joomla, drupal, oscommerce, etc. Dako kaau nang tabang kay ana xad ko sa una. Last month I work as web developer OScommerce akong projects medyo lisod jud cya una og daghan xad kag angay kat-onon for example kanang mga payments2x xad like googlecheckout, paypal, etc. kadugayan na master2x npod nako.ehehehe.. And dont hesitate to visit their website kay nay mga updates ad2 especially mga forums para ma wide pag maayo imong knowledge. opinion rana ako bro mao man sad na akong na experience gud. karon wa nakoy work kay nihawa nako ng freelance nlng ko..

  11.    Advertisement

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

 
  1. THE BEST of Free Web Hosting
    By tingkagol in forum Websites & Multimedia
    Replies: 73
    Last Post: 06-09-2014, 02:38 PM
  2. PHP Framework - Web Programming
    By growlite in forum Programming
    Replies: 2
    Last Post: 11-23-2011, 11:07 AM
  3. Website for web developers
    By vandalesm in forum Websites & Multimedia
    Replies: 4
    Last Post: 09-23-2007, 06:49 PM
  4. Anyone here using Plone and Zope Framework in web development
    By pronelgraine in forum Websites & Multimedia
    Replies: 1
    Last Post: 09-26-2006, 11:19 PM
  5. Surigao:: top 10 semi-finalist in 5th Philippine Web Awards
    By ScReWfAcE in forum Websites & Multimedia
    Replies: 11
    Last Post: 04-26-2005, 06:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top