۵ مطلب با موضوع «نرم افزار» ثبت شده است

mod_rewrite

http://www.elated.com/articles/mod-rewrite-tutorial-for-absolute-beginners

http://www.webforgers.net/mod-rewrite/mod-rewrite-syntax.php#quantifiers

  • پنجشنبه ۲ خرداد ۹۲

Yii: نحوه ی به کار بردن RBAC AuthItems در actionFilters کنترلر

در Controller یک متد با نام Filters وجود دارد که دسترسی به action های موجود در کنترل را فیلتر می کند. به عنوان مثال تعیین می کند که یک action با چه متدی از متدهای POST, GET, Ajax می تواند مورد دسترسی قرار گیرد.

  • چهارشنبه ۱ خرداد ۹۲

CActiveForm: Updating password_repeat field doesn't trigger client side compare validation

Link

        $form = $this->beginWidget('CActiveForm',array(
            'id'=>'pass-form',
            'enableAjaxValidation'=>true,
            'clientOptions' => array(
                'validateOnSubmit'=>true,
                //'validationDelay'=>5000,
                'focus'=>'input[type="password"]:first',
                'afterValidateAttribute' => 'js:function(form, attribute, data, hasError) {
                     if (attribute.name == "newPass_repeat") {

                        var settings = $.fn.yiiactiveform.getSettings(form);
                        successCallback = function (messages) {
                            $.each(settings.attributes, function () {
                                if (this.name == "newPass") {
                                    $.fn.yiiactiveform.updateInput(this, messages, form);
                                }
                            });
                        };

                        $.each(settings.attributes, function () {
                            if (this.name == "newPass") {
                                this.status = 2;
                            }
                        });

                        $.fn.yiiactiveform.validate ("#pass-form", successCallback);
                    }
                }'
            )
        ));
  • دوشنبه ۲ ارديبهشت ۹۲

The pattern used in Doctrine ORM

Object-relational mapping (ORM, O/RM, and O/R mapping) in computer software is a  technique for converting data between incompatible type systems in object-orinted programming languages. read more

I found 2 pattern for implementing ORM, one ActiveRecord  and other is Data Mapper + Unit Of Work
For example php-activerecord is a open source ORM uses ActiveRecord, and Doctrind uses Data Mapper + Unit Of Work, Doctrine is also open source.

#Doctrin IRC channel
(02:58:48 PM)
msoa: In wiki quotes "Doctrine 1.x follows the active record pattern for working with data, ", my question is that in Doctrine 2 what is the pattern used?
(03:00:32 PM) ocramius: msoa: data mapper + unit of work
(03:02:59 PM) msoa: ocramius: what's "unit of work"?
(03:04:41 PM) msoa: where i can find an atricle about why Doctine leave the ActiveRecord?
(03:08:35 PM) ocramius: msoa: http://martinfowler.com/eaaCatalog/unitOfWork.html
(03:08:43 PM) ocramius: msoa: http://martinfowler.com/eaaCatalog/dataMapper.html
(03:09:31 PM) ocramius: msoa: that's basically how the JavaEE ORM works too btw. In activerecord, you tend to delegate too much responsibility to your "entity", which instead should be dumb
(03:09:41 PM) ocramius: also, you're forced to extend entities from a base record class
(03:09:53 PM) ocramius: with the data mapper, anything could be an entity
(03:14:17 PM) msoa: ocramius: Thanks a lot


  • جمعه ۱۲ آبان ۹۱

ORM anti-pattern

ORM anti-pattern
  • شنبه ۲۲ مهر ۹۱
موضوعات