984 reputation
514
bio website
location
age
visits member for 4 years, 1 month
seen Nov 26 at 15:15

Oct
23
comment What is the point behind building an abstraction layer PDO Adapter class instead of using native PDO?
I'm strictly talking about the model layer that uses the database. I have what you are describing. I have a BLL (I call that part of the model) that has findSomething($id). That calls the database, in my other non-model VC areas I just call findSomething($id). In my model later the function findSomething($id) I have the actual SQL. I pass that the PDO connection. If I don't have a wrapper class, how can I pass that PDO connection around? Just include a file that has the raw PDO connection in it?
Oct
23
comment What is the point behind building an abstraction layer PDO Adapter class instead of using native PDO?
If I use straight PDO, how can I pass that around as an object? If I don't use a wrapper around PDO, does that mean I'd have to include the PDO connection in an require/include or in the constructor of each class that uses it?
Oct
3
comment How do I design my application to use REST for itself?
Thanks. Now I'm starting to see the need for things like Angular.js.
Oct
2
comment How do I design my application to use REST for itself?
Seems that all tutorials go for the consumer of services, but they never talk about your own app consuming your own services. I guess I was the only one asking.
Oct
2
comment How do I design my application to use REST for itself?
In your Symfony example, do you think that is proper? Is that what you mean?
Oct
2
comment How do I design my application to use REST for itself?
I do appreciate everyone's answer. I really do, but this doesn't really answer my question. Where do I put the HTTP verbs? Do I put it in a URL in my form's action? Do I put it in a hidden input somewhere? Do I do it all in AJAX and put the Type: I want? Where does this information go in my client that I'm saving my data to? If I use curl, that isn't helping me with my client's design. It only tells me my API is working for someone else that consumes it via CURL or some other library. I'm doing everything from an HTML page client.In other words, I cannot use all the HTTP verbs in HTML.
Oct
2
comment How do I design my application to use REST for itself?
I know our craft is complex by nature for the most part, and I can build it, but that seems to be really complicated for what I'm asking to do. Can it not be done without AJAX? If I do use AJAX with my "Type:" qualifier, such as in jQuery, aren't I just making up a type there? I mean can't I put any kind of type there? It's just that I happen to be adhering to the REST architecture that in reality isn't supported in HTTP?
Oct
2
comment How do I design my application to use REST for itself?
Why would it do this? Is this solely so it can be RESTful, having that architecture, even though you cannot really use those verbs?
Oct
2
comment How do I design my application to use REST for itself?
But how can I do that if the form tag does not allow PUT/DELETE requests to be sent? Say I want to use no javascript AJAX as you said. How do I use the HTTP verbs for an all internal application (no client), just my server. I also think my notions of client and server are messed up. In my app, aren't I the client and the server? The front end and back end? I do not have other consumers other than myself.
Sep
2
comment In MVC design, do I use a base class over an interface?
I guess I could say calling super, from language X.
Sep
2
comment In MVC design, do I use a base class over an interface?
Does that mean in the constructor of your concrete you do parent::__construct();, so you don't have to keep typing in $db = new PDO(....) or mysqli...?
Sep
2
comment application logic, business logic, models, controllers - where to put the application's brains?
@ErikReppen "It's also a heavily loaded marketing term that carries more "serious-sound" weight than practical use to most." That's the truth.
Aug
28
comment Is routing a site with RESTful not the best when you have very long URLs?
@Snowman I thought it was a design question, so I asked it that way.
Aug
28
comment Is routing a site with RESTful not the best when you have very long URLs?
@CameronMcKay What if I had 50 variables in the URL?
Aug
28
comment Front controller in PHP
I find the history very helpful. It helps in light of older code found in Git, Sourceforge, etc. I always wonder why people pick what they do, and I feel like I never have it "right." I don't know what anyone does.
Aug
26
comment DRY with Dynamic SQL vs. prepared statements
@DougKress Where do you do the connection?
Apr
17
comment How important is self-teaching in the programming field?
For those of us that are not talented, do not pick up things immediately, require reading and using the same things over and over until they get it, and ask lots of questions which are answered by really generous and patient people, the Myth crucial for inspiration in the hard times.
Apr
17
comment Do most programmers copy and paste code?
If I understand it.
Apr
7
comment Why is “Select * from table” considered bad practice
@cHao Why does "..and then proceed to create a Customer from each row. LINQ beats the pants off that." In the example you gave above? It is solely because of the object-relational impedance mismatch.
Mar
24
comment Is it bad software design to mix JDBC SQL calls and use an ORM in an application?
is the different than an ORM?