Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

alternatives to mvc

Name: not a marvel vs capcom player 2010-09-28 21:36

im gonna start a medium sized proyect at work (some kind of wiki). Obviously the team wants to use an mvc framework. But ...

Name: Anonymous 2010-09-28 21:37

...your a dirty c or perl hacker that doesn't believe in such things?

Name: Anonymous 2010-09-28 21:59

Name: Anonymous 2010-09-28 22:19

>>3 OP here
In fact i AM learning Catalyst right now (great piece of sotware, btw), in preparation for the project. But....

Name: Anonymous 2010-09-28 23:47

>>4
Take the opportunity to learn it then.

Name: Anonymous 2010-09-28 23:52

The thing is, is MVC the way to develop such applications? Is there any other good (or better) paradigm out there, even if it is less known?

Name: Anonymous 2010-09-29 2:39

>>6
For a wiki? MVC is appropriate. If you don't use an established MVC framework you'll probably just end up poorly implementing a half-assed one whether you intend to or not.

Name: Anonymous 2010-09-29 4:02

>>3
Having maintained and extended a web app written in it for almost a year now, I'd have to say it's pretty fucking horrible in almost every aspect except enterprise-ness.

Name: Anonymous 2010-09-29 7:34

>>8
In what aspects? I agree that is very complex, but if you document and test your stuff it should be manageable.

I would like to know what are the worst aspects of Catalyst according to you, so i can be a little prepared if we end using it...

Name: Anonymous 2010-09-29 13:07

You could go with something like Sinatra or one of its clones. It lends itself well to an MVC style, but it's flexible too. The nice thing about some of the larger frameworks though isn't necessarily the frameworks themselves, but the tools that come along with it to make things like schema migrations easier.

Of course, there's always idiomatic PHP style:

<?php
          <table border="0" cellspacing="0" cellpadding="2" align="right">
            <tr>
              <td align="center" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
              </td>
            </tr>
          </table>
<?php
    }
?>
          <p><?php echo stripslashes($product_info['products_description']); ?></p>
<?php
    $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
    $products_attributes = tep_db_fetch_array($products_attributes_query);
    if ($products_attributes['total'] > 0) {
?>
          <table border="0" cellspacing="0" cellpadding="2">
            <tr>
              <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
            </tr>
<?php
      $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
      while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
        $products_options_array = array();
        $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
        while ($products_options = tep_db_fetch_array($products_options_query)) {
          $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
          if ($products_options['options_values_price'] != '0') {
            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
          }
        }

        if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
          $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
        } else {
          $selected_attribute = false;
        }
?>

Name: Anonymous 2010-09-29 13:08

>>10
That's so ungayifying

Name: Anonymous 2010-09-29 14:08

>>10
Fuck you, you made me catch AIDS.

Name: Anonymous 2010-09-29 14:21

>>10
AUGH MY EYES!!!

Name: Anonymous 2010-09-29 14:36

MVC is honestly pretty crappy and is mostly used by ENTERPRISEY applications.

Name: Anonymous 2010-09-29 14:55

>>14
I have never written a program longer than 500 LOC.

Name: not 14 2010-09-29 15:23

>>15
Oh, come one, my university projects are ~2 kLOC!

Name: Anonymous 2010-09-29 15:27

>>15
That's because there's no Perl or Haskell program that can't be written in less than 500 LoC. Actually, in Perl you can do it all in one line.

Name: Anonymous 2010-09-29 15:39

>>15
Well the APL program that I used to generate every subsequent program that I have ever needed is only ~600 characters, so yeah.

Name: Anonymous 2010-09-29 21:09

>>18
You wrote a Lisp interpreter in APL?

Name: Anonymous 2010-09-29 21:45

Entity systems

Name: Anonymous 2010-09-30 3:45

>>17
Your point is moot. You could fit a 10k LOC C program in one line.

Name: Anonymous 2010-09-30 8:25

>>21
Not if you want to include anything.

Name: Anonymous 2010-09-30 11:39

>>22
Touché.

Don't change these.
Name: Email:
Entire Thread Thread List