Jump to content

proggR

Members
  • Posts

    431
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://sourced.fm

Profile Information

  • Gender
    Male
  • Location
    Ontario Canada

proggR's Achievements

Advanced Member

Advanced Member (4/5)

0

Reputation

  1. Can I have my name changed from hopelessX to proggR. I use proggR for everything else online and hopelessX is just a silly name.
  2. Good to know. Thanks for the answers.
  3. I'm curious if anyone has information on how much overhead there is with creating an object in PHP. I've tried finding some benchmarks but haven't really been able to find anything solid to use for reference. Also, when dealing with objects what optimizations can be done to improve performance. I ask because my project I've been working on is entirely OO. Everything, including views, are objects (though their state and behaviour is really just the model they're representing and a show() function that has the HTML used to display the model). This makes development very easy and clean but I'm trying to figure out how much of a difference I can expect in production and in what ways I can limit any negative side effects. What things could be cached, and what things can't? For example, is it possible to cache the class definition without caching instances of that definition (since they'd be different from page view to pageview)? Would that be helpful. Any pointers would be great. I haven't had a lot of time with performance tweaking so I'm not sure of any known pitfalls. I know objects and function calls use a bit more overhead but I've never found out how much more. Thanks in advance.
  4. Good to know, thanks. The place I work has a nightmare of a deployment strategy right now which got me thinking about how I will do it with my own projects. In the past I've just used FTP to copy my "staging" files to production but if I'm using git anyway during development I figured using the master branch for production made sense.
  5. I'm trying to think of the best way to deploy production updates for a website I'm working on. Right now I'm toying with the idea of using the master branch of a git repo for production. I would develop from a development branch and when it comes time to roll the updates into production I would make a staging branch from production and merge the develop branch into that, test and merge that into the master branch. With that said, does anyone see any issues with this strategy? What security measured should be taken if this is the process that gets used? I would limit read/write access to known computers using an ssh key. Are there any other things to take into account if I were to use git over ftp for deployment? Any thoughts would be appreciated.
  6. Thank you for the insight Gizmola. I work at a university so I may see if I can get some free advice from an accounting/legal prof. I did get a reply from FreshBooks and they said they don't have anything explicitly like this but I could collect the information and save it as a draft invoice and on the successful completion of the project, loop through each drafted invoice and process the payment. The thing I can see not working with this is NSF at the time of the processing. I know that Amazon FPS allows for this type of model because its what Kickstarter uses. But I don't want to limit myself to only US customers.
  7. Ya I do intend to arrange a meeting with my bank. It would be convenient if they have some kind of ability to handle this. I have been looking around at other processors. They all seem to do the payments upfront which doesn't exactly work. Since I only want to commit the transaction if the project reaches 100% of its requested funding, if people donated to it and it didn't reach the funding I'd be paying transaction fees for taking the money and transaction fees for returning the money and wouldn't have actually made any money in the first place so it would be a loss for me for every failed project. I did just stumble across FreshBooks and sent them a message explaining what I'm looking for. They're more of an invoicing app but it may work still for what I need. We'll see. I'll keep checking back and update if I find anything as well.
  8. I have a kind of strange need from a payment processing service. If you look at Kickstarter.com you'll have a better idea of what I mean since the payment model is similar. Users donate money to a project, but their donation only actually gets taken if the project gets 100% of the funding they requested. Even though that's the case, I need to process the user's donation up front so at the time the project is finished the transaction can be completed all at once. If the project doesn't get 100% of the funding they need, none of the users pay anything and I would hope that I wouldn't be stuck with transaction fees for what wasn't a transaction as well. I'm wondering if anyone knows of any services that allow something like this. Kickstarter uses Amazon but that limits you to only US customers. I'm hoping for something that doesn't have that limitation and obviously the lower the transaction fees the better, especially since some of the donation amounts could be only $5. Any pointers would be great. I've done very little with online transactions before so taking a stab at such an unusual model makes it tricky to find what I need.
  9. Just a drop in the ocean. If one extra database request per signup was bad then you'd have more problems than just efficient code. True enough. The same thing happens on signin and one other type of content creation but nothing major. And ya, one extra request isn't the end of the world, I just figured if there was a more efficient way to do it I'd like to do it that way. Thanks again
  10. Not a problem. I thought this may be the case. Its unfortunate since its an extra database request that otherwise wouldn't need to be made but if I must I must I suppose. Thanks for clearing that up.
  11. I'm wondering if there's any alternatives to redirecting. For example, after the registration process, I have a fully loaded User object with all of the information I need to load the user's profile (the place that logging in/registering takes you to). I can call the profile action of the user controller and pass in the User object and it will display just fine. The problem is that since the URL is still pointing to the register action if the user refreshes their page its going to try sending the previous form again. Alternatively I could redirect to the profile and have it load that way, but then I'm fetching data from the database seemingly unnecessarily since I had all of the data I needed already fetched prior to redirecting. Is there anyway that I could do the first process but change the url and forget the previous form data so that if they refresh its just refreshing the profile and not resending the previous request? Thanks in advance for any help.
  12. Nevermind, that was my fault entirely. It was running when the page initially ran and I didn't realize so when I called the Ajax.Updater and it passed in the users that were already displayed it skipped a part of the script above. The code showing up in the source was from the initial page loading, not from the call I was making. Its working now. That took far too long to figure out. :\
  13. Ok this has been driving me absolutely crazy. I have a script that gets called by Prototype's Ajax.Updater() class which should then update a div. It does update the div but a portion of what gets outputted doesn't render. if (is_array($PROCESSED["associated_proxy_ids"]) && count($PROCESSED["associated_proxy_ids"])) { foreach ($PROCESSED["associated_proxy_ids"] as $student) { if ((array_key_exists($student, $STUDENT_LIST)) && is_array($STUDENT_LIST[$student])) { ?> <li class="user" id="audience_student_<?php echo $STUDENT_LIST[$student]["proxy_id"]; ?>" style="cursor: move;"><?php echo $STUDENT_LIST[$student]["fullname"]; ?><img src="<?php echo ENTRADA_URL; ?>/images/action-delete.gif" onclick="removeAudience('student_<?php echo $STUDENT_LIST[$student]["proxy_id"]; ?>', 'students');" class="list-cancel-image" /></li> <?php } } } I've echoed from within the foreach and the following if and the $student variable does have a value, however I'll point out that it also doesn't render but that may be because its not a <li>, I'm not sure. Now, if I take that li element lin end output it outside of the foreach loop it renders just fine(once I substitute the $student variable for a known index of course). Inside the loop it doesn't. I can see it in the source code of the page but for some reason its not rendering. I'll put the output from the source of the page below, the top is the code output from within the loop and the bottom is from outside of the loop. The bottom renders as expected, the top doesn't. <!--foreach li element:doesn't render--> <li class="user" id="audience_student_2" style="cursor: move;">Hudson, Tom<img src="http://localhost/entrada/www-root/images/action-delete.gif" onclick="removeAudience('student_2', 'students');" class="list-cancel-image" /></li> <!--non foreach li element:renders--> <li class="user" id="audience_student_2" style="cursor: move;">Hudson, Tom<img src="http://localhost/entrada/www-root/images/action-delete.gif" onclick="removeAudience('student_2', 'students');" class="list-cancel-image" /></li> They're identical. I can't figure out for the life of me why this isn't working. Any help would be great.
  14. I'm working on a website for my sister. She has a font and wants a stroke around the text. the -webkit-text-stroke property works wonderfully but obviously not in any non-webkit browsers. I have a text-shadow for the others but it doesn't look anywhere near as good and in webkit browsers it adds the shadow outside of the stroke which makes it too thick. I was wondering if anyone knows of a text-stroke hack that I could use so I don't resort to using pngs :\ Thanks in advance.
  15. I've always been similar. I've written a blog engine 3 times now I think just because I refused to use WP or MovableType. I can honestly say I've learned the most by doing things the hard way and it definitely makes you appreciate the work people have put into the frameworks to make it easier for people. I personally wouldn't ever try to make my own javascript framework but that's because I'm far less comfortable with it and I've grown fond of jQuery. That doesn't mean that you shouldn't if you feel its something you're capable of. The hiccups you'll experience along the way will be what makes you a better developer. That's my 2 cents.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.