Frustrating not Knowing How to Deploy Multiple Applications Properly

As of yet, since purchasing ScriptCase, I end up fully deploying projects ? meaning I tick both check boxes for every project I create, otherwise it doesn’t work if I follow the documentation from this site. From my understanding, once I’ve deployed one project fully, I don’t need to deploy the common libraries. However, if I don’t, I can’t get the damn thing to work. By the way, I use the ZIP method of downloading the files, extract them and place them on the server.

Similar thing with the ‘prod’ folder. I’ve been told I only need one of them, however where do I put it?

I don’t see any help on the ScriptCase website telling you what the correct folder structure is.

Below shows my folder structure. In my case , ‘acmfootball_16’ and ‘acmfootball_19’ have been fully deployed, ‘acmfootball_17’ has not, with only the ‘Deploy with the common files’ check box ticked when deploying it…

Problem is, when I access the URL that leads to the created project (acmfootball_17), I get returned with this:

So it’s looking for the ‘prod’ folder in the ‘_lib’, but it’s not there.

This leads me on to ask: based on what I’ve said, how do I correctly deploy an application via ZIP file? I know many, many other people have had exactly the same issue, so I am not alone.

I am getting sick and tired of deploying the whole thing each time I create or make a small change to an application. My internet connection is not the fastest either so uploading the whole thing each time via FTP takes absolutely ages.

Thank you.

Capture.jpg

Capture2.PNG

Capture3.jpg

I can only tell what I do. I deploy every application full once. Then I upload only the changed files. I know that I have deployed the _lib for every project. But if you don’t you will have to test and deploy all your projects at once if there are changes in the _lib somewhere. Since we have a lot of projects in production we need to be able to handle changes on a single project base. Therefore we use the full _lib for every project.

We deploy locally first on our development engine. Not by zip, but by folder. Then with filezilla we upload only what’s necessary, which useually are only the few changed applications.

It’s not that I don’t think that it should be possible to share the _lib. But that’s an issue SC needs to deal with. We are just (heavy) users :wink:

Hi supermessiah,
Here is an example to configure a deployment step by step.

[SIZE=20px]Directory structure step by step[/SIZE]

GOAL: I want all the scriptcase applications running in “myapps” folder. This is the absolute path of “myapps” folder:
/home/a/public_html/myapps/

When scripcase deployment wizzard ask you for the folders, you should use something like this:

  • Common Libraries Folder:[B] /myapps/_lib/prod[/B]
  • Images Folder:[B] /myapps/_lib/file/img[/B]
  • Temp Folder:[B] /myapps/_lib/tmp[/B]
  • Documments Folder:[B] /home/a/public_html/myapps/_lib/file/doc[/B]

Note: As you can see, all the paths are relative to “myapps” folder. Only Documments folder is an absolute path. And the first time you need to upload the common libraries.

[QUOTE=aducom;12588]I can only tell what I do. I deploy every application full once. Then I upload only the changed files. I know that I have deployed the _lib for every project. But if you don’t you will have to test and deploy all your projects at once if there are changes in the _lib somewhere. Since we have a lot of projects in production we need to be able to handle changes on a single project base. Therefore we use the full _lib for every project.

We deploy locally first on our development engine. Not by zip, but by folder. Then with filezilla we upload only what’s necessary, which useually are only the few changed applications.

It’s not that I don’t think that it should be possible to share the _lib. But that’s an issue SC needs to deal with. We are just (heavy) users ;-)[/QUOTE]Right, okay, thanks. Although — that does go against what the ScriptCase manual says. It makes it sound pretty easy to deploy applications, but I find it ludicrous that such a fundamental problem has not been resolved. I refuse to pay well over $100 to buy private support tickets just to talk about this issue with someone. I’m relying on people’s knowledge and their methods for deploying.

Not that it matters to ScriptCase because they’ve already got my money, but PHPRunner doesn’t seem to have any of these deployment issues from what I’ve heard — plus the source code is in English, not Portuguese. May have to consider paying a fortune for that now just so I can have an EASY way of creating, editing and uploading projects.

Preposterous.

[QUOTE=aducom;12588]I can only tell what I do. I deploy every application full once. Then I upload only the changed files. I know that I have deployed the _lib for every project. But if you don’t you will have to test and deploy all your projects at once if there are changes in the _lib somewhere. Since we have a lot of projects in production we need to be able to handle changes on a single project base. Therefore we use the full _lib for every project.

We deploy locally first on our development engine. Not by zip, but by folder. Then with filezilla we upload only what’s necessary, which useually are only the few changed applications.

It’s not that I don’t think that it should be possible to share the _lib. But that’s an issue SC needs to deal with. We are just (heavy) users ;-)[/QUOTE]Thanks for your advice. I’ve tried your method and it works now. The problem I didn’t realise is that the _lib was generating new files for some of the different applications I was deploying. My question would be, why isn’t the _lib folder a one off? I shouldn’t have to be adding files to that folder for a new application I create, but there were some images I had to put into the _lib when I deployed my second application. Why weren’t these images already in the _lib folder? I thought they would be there as the _lib is meant to contain everything.

Anyway, I used a tool from http://winmerge.org/ that can analyse file differences between two folders (and their subfolders). That helped me out a lot. I now know what I have to do. ScriptCase should put this in their documentation — or even better, sort out this _lib issue. EVERY file in that folder should already be generated. It would be a hell of a lot easier if I could just deploy the folder that contains the unique application files, without having to check the _lib folder each time for changes.

Yes, this is an issue SC should resolve. However I’m not one of the users who believe that I would share all my apps on the same lib. Simple fact is that if libs are changed, I need to regenerate, test and deploy all my apps at once, and I have quite a lot. I like to do that one-by-one. Then sharing _lib is the worse possible solution, no matter what SC docs says.

I’m not going into details of PHPRunner, this is not the appropiate place for that, but I’m glad I left there. I know that the English is a bit of barier for SC support as they are Portuguese. But we all like to help everybody out where possible, here, and on our own forum which is also accessable for non-customers of us (as a reseller I mean).

Just want to understand what is being said here
When we say applications we mean an entire project correct?
I.e I gave an hr project that has 20 applications
They all use the same _lib directory

I would never share the same _lib with another project

Sorry feel like I am lost in translation

Pun intended

Kev

[QUOTE=Kdriscoll;12619]Just want to understand what is being said here
When we say applications we mean an entire project correct?
I.e I gave an hr project that has 20 applications
They all use the same _lib directory

I would never share the same _lib with another project

Sorry feel like I am lost in translation

Pun intended

Kev[/QUOTE]Yes, that is what I mean.

Why not? I thought the ‘_lib’ has all the files that can be REUSED. And in any case, what folders do I not include (see image) if I was to use one _lib for each project I deploy? Obviously the ‘prod’ because you only need one of them. What else?

Capture.jpg

It’s a matter of definition. All applications within the same project share the same _lib. I know that some users like to share the same _lib for more projects. I’m not one of them, I like to have a _lib for every project because it allows you to be able to work project by project. It’s the same issue that you cannot currently migrate one project at a time from 6 to 7. It’s the same argue. If you have a lot of projects you cannot afford to have all projects regenerated and tested at the same time if there’s some update in the _lib.

I believe that it should be possible to share _lib for more than one project. But you need to do something. I haven’t tried, but if you use the same _lib, you need to share the same connection, or maintain the connections from one _lib. Never done / tried that. I don’t like to put all my database tables of several projects into one main database instance.

To me it’s best practice to have every project his own _lib and his own database and thus his own connection.

[QUOTE=aducom;12622]It’s a matter of definition. All applications within the same project share the same _lib. I know that some users like to share the same _lib for more projects. I’m not one of them, I like to have a _lib for every project because it allows you to be able to work project by project. It’s the same issue that you cannot currently migrate one project at a time from 6 to 7. It’s the same argue. If you have a lot of projects you cannot afford to have all projects regenerated and tested at the same time if there’s some update in the _lib.

I believe that it should be possible to share _lib for more than one project. But you need to do something. I haven’t tried, but if you use the same _lib, you need to share the same connection, or maintain the connections from one _lib. Never done / tried that. I don’t like to put all my database tables of several projects into one main database instance.

To me it’s best practice to have every project his own _lib and his own database and thus his own connection.[/QUOTE]So do you use a separate ‘prod’ folder then for each project?

That ‘prod’ folder is massive (over 30MB), so it takes up a large chuck of the _lib folder’s size.

Yes, but w.o. _lib it’s also pretty huge if your project has a lot of apps. I don’t only have a prod directory but also test and acceptance environments. But I don’t always upload the full stuff, only the changed files. (We work fully in DTAP street development, test, acceptance and production) Webhosting currently is far cheaper then it used to be, so the hosting size is not a real issue actually.

Yea
I understand about the size, Iny previous job we used a tool called witango but it used its own application server
But the file sizes to generate were tiny.

Just come to the realization that if I am going to use a tool
It will have its drawbacks
But we tested using asp a few years after using witango and the sizes were huge to deploy

I look at it this way, space is the easiest part to increase

Each one of my projects are at least 50 meg
I have deployed some very small projects and it still uses 50 meg
But all of mine have audit trails and security

Though I do reuse all my company pics for all my projects

I wish we all could learn from each other
I am new to this but I have made a few apps that the company is quite happy with

Kev

We have used a lot of tools and most happy with SC. But yes, using case tools do have their drawbacks. One improvement for the creators of SC would be to find out which parts of the lib is actually used and which are not. That way the _lib could be much smaller if created dynamically based upon the projectd. I have a lot of projects not needing fpdf, barcodes etc. I even wouldn’t mind to set switches which part should be in and which out.

Agree

Kev

Hi guys,
This is a good thread. Just for the record here is how I work. I am currently a SC V6 user.

I work on development PC, a laptop. I have SC installed and before I click on the SC icon, I first make a SSH tunnel using PUTTY to my webserver. I do this because I want to use the mySQL databases there, and once I have the PUTTY logged in to my server, I have the SSH tunneling so my local machine can access the webserver DBs as localhost. believe me, it save saves a lot of messing with databases in the long run I have found. I am using a Sony Viao laptop, but I am always online. I feel secure using this arrangement even at coffee hsops, as no one is getting into that SSH tunnel :slight_smile:

So I can easily and freely generate source code, and run the login app or whatever I wish, on the local PC. I have only found one thing I have ever had to ‘run’ from a webserver to test, and that was a non-SC payment system.

So after some development work, I force myself to do a total ZIP based deploy. Once the zip is created by SC, I download onto a folder on my laptop called …/deployments/ , create a folder called …/deployments/project-xyz-v-1-3 or whatever. I then us WinZip7 to extract everything to that subfolder. That is EVERYTHING needed to deploy the site. As long as you work carefully within the SC system, all images and code you need are in there. It took me a while to get used to that, as I have always used more conventional IDEs where you have to track and take acre of stuff like …/images/logo.png and such that you are referencing.

Then I use WinSCP to upload the CONTENTS of that folder to my webserver into the appropriate prep-prepared web folder. I have already tested that webserver folder when I created it on my webhost control panel as a PHP application with a mysql DB also up there. Since I have already been testing with that DB form the laptop, I know it will work 100% the same. I always test my subdomains and such before I do the first deploy, so I know www.blahblah.com will go to an fake index.html at least. Do that before you do any SC deploy, to isolate any potential problems.

The first time using the app deployed this way, your app will prompt you to edit the connection to the DB. Do that one thing takes just 30 seconds. save and then logout. BTW Note your new password for that control panel, althought I have never had to go back in and fix a connection. But that could come up later, especially if you lost the new password :slight_smile:

So then try the domain again and the default app you choose in SC during the process of the deployment will come up. Log in and test. I always have a working system. Of course, I am getting real world test of the whole thing thru my browser, etc.

Just a side note that I try to test my app on 3 major browsers (FF, IE10, and Chrome) as well as from an android phone, tablet, etc.

I would recommend that you NEVER deploy over top of your production site directly. You could introduce some error and then be chasing bugs on a live site. Simply set up a staging folder as a php app, with some variant of your domain name, like stage.blhblh.com . That way, when it is working and tested 1000%, you can deploy to the production folder.

I also always completely clear my webserver folder when doing a zip deploy, just to get rid of anything old that might linger and cause me security headaches in the future - like if you were testing an SC app with no security, orphaned it, forgot it, but never deleted it later.

So my …deployments folder down on the laptop (and sugar sync AND another copy on a network backup 1TB drive), always has ever exact copy of all my deployments. I can always in a pinch fall back by deploying the last version, etc.

Now, that said, I always do a zip deployment after incrementing my project version. So if I got from 1.2 to 1.3, I do a clean zip deployment. I love the incrementing, as it gives you a snapshot on the project. I only do this when I have a big thing I am working on or some kind of milestone. But I do find project incremeting very useful way to document and have a safety net under me.

So in between those zip deploys, I have started using the FTP deploy. In fact, I always test locally and then force myself to do a quick FTP deploy right then and there. Number one, I have all the apps open that I have been working on, so I can easily check just 1 or 2 apps needed to be uploaded. Then I FTP them using the built-in FTP, which is not super fast but on 1 or 2 apps is not big deal. Then I test online. You do not have to do the connection configuration ro anything else. This is usually a test of customization of the event code that represents my business logic, or some other type of moderate changes. I even will make a new app and deploy it in this way.

PLEASE SC - please please please tell me that V7 saves the FTP settings :slight_smile: I haven’t tried V7 yet, as I am letting the dust settle on the fixes. But it would be nice. Chrome saves the settings, if you click on the first letter of the field, but not optimal.

You guys would laugh when I very occasionally click to deploy everything on FTP - no way to stop the agony LOL. But usually I have a pretty snappy workflow going this way. Again, after working like that for a few days or whatever makes sense to me, I deploy a clean, full zip deployment.

So for better or worse that is how I work. I have thought about running SC from my webserver or a staging one, which would make deployment to a folder a nice option as well. But it is just me for now developing, and I like my laptop. You could get to the point where all development is thru the web with SC… not a bad option. A great option for multiple programmers on the same project.

All in all, SC has been useful and pretty powerful tool. I do a lot of customization with events, some javascript, some ajax, adn even injecting echo for CSS code and javascript as needed. But I always am able to do so within a SC project. I only dig into the generated code with NotePad++ when I do a dumb thing like paste and modify a 100 lines of php code and then throw a { or ; type error. I will use notepad to look at the local or web version of the bad file, and usually deduce the syntax errors location - then I fix it in the project SC app.

Hope this helps anyone out there figure out good ways to effectively use SC.
Peace,
Jamie

PS Have any of you found enhancements in SC V7 deployment I should get all excited about?