Archive for the ‘php’ tag
Announcement: python and django courses
Talking about Mansura I’m feeling we -elder developers- can play better role in adding one more “REAL” valid Open source competitor specially when I’m witnessing lots of young developers adopting python and django as the main tools in their graduation projects and independently organized projects including 3 of them mentored by me.
I’m hoping that we can start this in the right way, pull developers to the collaborative attitude, create user active user groups early, start more community projects, use standard techniques early and avoid problems we faced in PHP communities.
That’s why I’m planning to give courses related to python and web development using django framework.
Soon isA I’ll be posting contents of the Python course and django course.
Stay tuned
Salam
دورة برمجة ويب -Web Development course
السلام عليكم و رحمة الله و بركاته ..
بعد طلب كتير من الجماهير الغفيرة و لأني مش عارف ليه إشتقت فجأة لإني أشرح .. أنا هبدأ دورة ويب جديدة سريعة في المنصورة .. قريب جدا جدا إن شاء الله غالبا في خلال ١٠ أيام..
المواضيع الرئيسية في الدورة ..
- HTML
- CSS
- Javascript
- PHP
- OO PHP Programming
- MySQL
- AJAX
مدة الدورة هتبقى ٦٠ ساعة و مرتين في الإسبوع و المرة الواحدة ٥ ساعات يعني من شهر ونص لشهرين..
لو حابب تشترك في الدورة إضغط الرابط التالي:
في شباب بالفعل إشتركوا ودول مش ضروري يملوا الإستمارة لكن لو دخلوا تفاصيلهم ده يبقى أحسن برده ..
و عموما أنا -إن شاء الله- هبعت بريد لكل المنتسبين للدورة في أقرب وقت ممكن فيه تفاصيل الدورة ..
والله الموفق
Singleton mySQL database connection using PHP
فيما يلي مثال على الـ Singleton Design Pattern
و هو ما يعطيك الإمكانية في الحصول علي فقط نسخة واحدة من أي مورد تريد إستخدامه .. في هذة الحالة مثلا الإتصال بقاعدة البيانات و ذلك بأن تستخدم الدالة getConnection بدلا من عمل نسخة جديدة من connection كل مرة هتحاول فيها الإتصال بقاعدة البيانات..
Following is a brief example for the singleton design patterns which will enable you from having only one instance of the resource you are controlling .. in this example it’s the mySQL database connection.
Else you will have multiple instances of the same class “connection” each time you want to connect.
define('DB_NAME', "test");
define('DB_USER', "root");
define('DB_PASS', "rootpass");
define('DB_HOST', "localhost");
class Connection{
private static $connection_;
private function __construct(){
$con = mysql_connect(DB_HOST, DB_USER, DB_PASS);
mysql_select_db(DB_NAME, $con);
Connection::$connection_ = $con;
}
public static function getConnection(){
if( !Connection::$connection_ )
new Connection;
return Connection::$connection_;
}
}
$con = Connection::getConnection();
في رعاية الله و أمنه
Survival..
السلام عليكم و رحمة الله وبركاته
Last 2 weeks
I was working last 2 weeks -between Cairo and Mansoura- for tadabborIT, for tadabbor website next release, also I’ve attended the JDC2010 conference and through that week I should have read about 4 reading tasks and should have solved tasks by Design patterns course by my dear mentor Ahmed Soliman, while planning to join GSoC.
Not to mention the courses and websites I’m delaying and canceling ..
And here I’m defining a new busyness level ..
One note before i go: If i survived that stage, I think I’ll be much more stronger than what I used to be, I also believe that It should be a milestone.
Anyway, I believe I can try
TDD using PHPUnit, NetBeans
السلام عليكم و رحمة الله وبركاته
This post is more than month on my drafts ..
It’s about using NetBeans 6.7.1 PHP IDE with PHPUnit I wanted to show how easy is it to make a test and run it ..
so I’ll share the experiment ..
As shown in the following slideshow:
1-I created a PHP Class file:
2-I created empty file with a class and couple of methods
3-I generated a test for the class and it prompted me to choose the folder where I’ll put the tests
4-Finally(My favorite part) I right click the test file to run it and I get the result in green and red … obviously
green is test passed or pending and red if it’s failed ..
Note: I used to use simple test , still can’t find equivalent test method to test the HTML interface … and it always required me to view the test results in the browser ..
PHPUnit is more fun now and it’s integrated to NetBeans, the IDE I recently love at most specially on Mac
tadabor.com, one more 7-12 website
السلام عليكم و رحمة الله وبركاته
الحمد لله والصلاة والسلام على رسول الله
أنه لمن دواعي سروري ان أعلن إني فعلا فخور بموقع الهيئة العالمية لتدبر القرآن الكريم
و شكرا لـ:
My dear framework 7-12
م.محمد العشري مدير شركة تدبر
وشكر خاص جدا .. لماهر سيف “الماهر بأمر الله ” اللي بهدل ٧-١٢ ![]()
فريق التصميم في شركة تدبر و مهندس علاء الدين حسين .
وأسأل الله العظيم رب العرش العظيم أن يجعل الموقع و المواد المتاحة عليه في ميزان حسناتنا وميزان حسنات الشيوخ القائمين عليه و الهيئة وأن ينفع الله به الكثير من الباحثين عن الهداية و طلبة العلم من المسلمين والمسلمات.. اللهم آمين .. اللهم آمين .. اللهم آمين ..
والحمد لله رب العالمين