Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 920 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

A small subscription function - OOP or Modular Programming?

Thread title: A small subscription function - OOP or Modular Programming?
Closed Thread    
    Thread tools Search this thread Display Modes  
11-11-2008, 10:12 PM
#1
developer_x is offline developer_x
Status: Junior Member
Join date: Mar 2005
Location: Copenhagen
Expertise:
Software:
 
Posts: 88
iTrader: 0 / 0%
 

developer_x is on a distinguished road

  Old  A small subscription function - OOP or Modular Programming?

Hi all,

I have a small function to develop. and I am unsure if doing it the modular way or the OOP way would be the right way to go.

A basic email form, to get a person's email. Once the user presses the submit button after typing the email address, an email is sent to him/her.

Once he approves the validation link from the subject of his email, he is informed that he has subscribed to the newsletter.

There is no newsletter and no admin panel for the administrator.

Just a basic signup function making use of ajax on the email form side and the PHP's email functions. The email addresses and the Flag Status is saved in a mySQL database accessed through a database.php file.

I want to know if for such a small function:

- OOP concept (classes, objects, polymorphism) is possible to use
- if usage of such an OOP concept in the coding would be a wise choice to make?

Obviously, I am not well equiped with the basic reason to use OOP as in data encapsulation etc. So a good explanation of why or why not I should prefer OOP or structured programming here would be really appreciated and beneficial.

Regards,
developerx

11-12-2008, 10:33 PM
#2
developer_x is offline developer_x
Status: Junior Member
Join date: Mar 2005
Location: Copenhagen
Expertise:
Software:
 
Posts: 88
iTrader: 0 / 0%
 

developer_x is on a distinguished road

  Old

No answers?

11-13-2008, 01:01 AM
#3
rkquest is offline rkquest
rkquest's Avatar
Status: I'm new around here
Join date: Nov 2008
Location:
Expertise:
Software:
 
Posts: 18
iTrader: 0 / 0%
 

rkquest is on a distinguished road

  Old

I believe when it comes to OOP programming with PHP, the best to use it is when you expect other people to modify or create other applications based on your script. For example, if your distributing your software as open-source or if you work in a team.

I think procedural programming is more efficient (technically faster and use less system resources). So I'd say it's a choice between program efficiency and time efficiency (when it comes to development).

11-13-2008, 04:40 PM
#4
developer_x is offline developer_x
Status: Junior Member
Join date: Mar 2005
Location: Copenhagen
Expertise:
Software:
 
Posts: 88
iTrader: 0 / 0%
 

developer_x is on a distinguished road

  Old

Hi, thanks for your answer... What you said makes sense to me..

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed