Server side processing with DreamWeaver CS5.5 for iPhone and Android

curiouswebster
curiouswebster used Ask the Experts™
on
I am new to DreamWeaver CS5.5 and wonder what my options are for server side processing. I am used to Model View Controller in C#. What technology would I use in place of C# with DreamWeaver?


Please explain all my options.

 
Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Jason C. LevineDon't talk to me.
Commented:
Current versions of Dreamweaver are pretty much limited to PHP/MySQL and ColdFusion/whatever if you plan on using the built-in code-writing wizards.  

If you are writing your own code, then Dreamweaver will function as a visual editor for you.
Most Valuable Expert 2011
Top Expert 2016
Commented:
To what jason1178 mentions, please let me add this: Do not use Dreamweaver PHP code as a template for anything you are doing.  Dreamweaver creates some of the worst PHP code ever written.  I cannot speak to the quality of the CF that Dreamweaver might create, but I can tell you that I see many, many questions here at EE from people who tried to learn PHP by reading Dreamweaver code and got hopelessly lost, creating applications that are full of security holes, unmaintainable and impossible to debug.

Instead, if you want to learn PHP, add these two excellent books to your professional library and let them give you some structured learning experiences.
http://www.sitepoint.com/books/phpmysql4/
http://www.amazon.com/dp/0672328887

Best regards,
~Ray
curiouswebsterSoftware Engineer

Author

Commented:
I am not committed to DreamWeaver, but it looks like a good platform to tie together the creation of one application that I can deploy on iPhone and Android. True?

But I am confused about what code I will be using as a "Model"? PHP is the scripting language that looks a lot like Razor, the MVC3 .cshtml files. But in ASP.NET I use C# as the backend server language. Will I be using Javascript for this?

I am very curious and a bit confused how it al fits together.

Thanks.
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

Most Valuable Expert 2011
Top Expert 2016
Commented:
PHP runs on the server, much like your C# code in ASP.NET.  JavaScript runs on the client machine.
curiouswebsterSoftware Engineer

Author

Commented:
I guess I never saw PHP. I know I ported PHP pages to Razor on a C# project last year, and thought the .php file was the whole language. That was clearly client side since it contained HTML and CSS.

Where can I get a look at the PHP language and how it ties into HTML?
Jason C. LevineDon't talk to me.
Commented:
>>  That was clearly client side since it contained HTML and CSS.

Sort of.  PHP gets parsed by the server before it is sent to the client so it is frequently intermixed with normal HTML and CSS.  This is perfectly normal.  For example:

<html>
<head>
<title>Test of PHP on <?php echo date("M d, Y"); ?></title>
</head>
<body>
<h1>This is HTML</h1>
<?php echo "<p>This is HTML on PHP.</p>" ?>
<h3>Any questions?</h3>
</body>
</html>

Open in new window

curiouswebsterSoftware Engineer

Author

Commented:
Where can I put logic, I meant?  Where would be the counterpart for C#?

The PHP looks like I recall, which is why I wonder where I will create the "Model"?

I will rarely use static text like you did. Instead, I will be reading the values from a database and need to display dynamically them on the page. How can I do this with PHP?

Javascript?  Java?

I would love to use MVC for this project and found this link:

http://php-html.net/tutorials/model-view-controller-in-php/

where I see this Model defined...


include_once("model/Model.php");  
 
class Controller {  
     public $model;  
 
     public function __construct()  
     {  
          $this->model = new Model();  
     }  
 
     public function invoke()  
     {  
          if (!isset($_GET['book']))  
          {  
               // no special book is requested, we'll show a list of all available books  
               $books = $this->model->getBookList();  
               include 'view/booklist.php';
          }
          else
          {
               // show the requested book
               $book = $this->model->getBook($_GET['book']);
               include 'view/viewbook.php';  
          }  
     }  
}
Jason C. LevineDon't talk to me.
Commented:
PHP is not an MVC language in and of itself.  

There is an MVC framework written in PHP called Cake (CakePHP).  FYI, you're well beyond what Dreamweaver does at this point and would be using it primarily as a visual editor for the HTML/CSS
curiouswebsterSoftware Engineer

Author

Commented:
Would I be able to run CakePHP on an iPhone app? Could I code CakePHP in DreamWeaver?

DreamWeaver seems to have done the very heavy lifting regarding iPhone and Android app deployment and testing. So I may try and stay within their limits. But if I could stretch the limit by imposing an MVC framework, all the better.

Let me know if this is doable...

Thanks.
Jason C. LevineDon't talk to me.
Commented:
Native app or web app?  If native, then not really.  Those apps are created mainly with JQuery mobile and server calls are the only thing you connect out for.  Cake could be the backend data supply though.
curiouswebsterSoftware Engineer

Author

Commented:
I am using DreamWeaver to create a web app that I can then deploy on iPhone and Android.  But I need to crank out this app and might I find the convenience of CakePHP to make it out of an architecture I really like (MVC) cause me more time to write it?

I have never written an app in PHP and looking at it (for me at least), it seems to need the structure of Model View Controller.

Anyway, I now see that PHP can provide the robustness to write all the code needed for my pretty simple app.   My last decision will be whether to use CakePHP or not...
Don't talk to me.
Commented:
>> PHP and looking at it (for me at least), it seems to need the structure of Model View
>> Controller.

Not really.  If you want to use MVC and PHP then Cake is where you want to go.  But you don't need MVC to use PHP and data operations.
curiouswebsterSoftware Engineer

Author

Commented:
Thanks. I would rather not use CakePHP since this is a simple app anyway. I think I just need to get comfortable with the language, etc.

Thanks for the help!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial