Creating SVN repository server with XAMPP on windows - eclipse

For last 3 days I am struggling in setting up my SVN server. I tried several ways and tools but I found always some issue and bug all the files.
I am planning to use the following tools for this project.
For Server and database - XAMPP (Comes with APACHE and MySql)
Version control server - subversion-1.6.16
Version control client - tortoiseSVN
IDE is Eclipse
Following are my queries
1. Is the above combination of tools and softwares is perfect for my project?
2. Is there any open-source software which provides all the above functionalities combined?
3. If anybody of you has already done such kind of project, could you please share with me which are the correct version of softwares I should use to get it worked error free.
If anybody can provide solution for below I can carry on with my current setup also.
My Error Message from server for current configuration : I tried to setup the svn-win32-1.6.16 with my XAMPP installation by copying the two moduels mod_dav_svn.so and mod_authz_svn.so to my apache modules directory and changed the httpd.conf file with Loadmodules of these the so files and set the location also for these. But when i start the server in error logs I get error message like this - "httpd.exe: Syntax error on line 136 of C:/xampp/apache/conf/httpd.conf: Cannot load C:/xampp/apache/modules/mod_dav_svn.so into server: The specified module could not be found."
Following are pre-conditions and configurations prior to this error
Location of SVN - C:/SVN/svn-win32-1.6.16
Location XAMPP - C:/xampp/
Changes in httpd.conf file
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
and for location
# Enter this location in your browser to access the repository
<Location /repos>
DAV svn
SVNPath c:/SVN/svn_repos
</Location>
I have created the repository here - C:/SVN/svn_repos

Is the above combination of tools and softwares is perfect for my
project?
That is impossible to answer, because:
a) we don't know what your project is
b) nothing is perfect
But it is definitely an ok combination of tools. If I were you I would not use XAMPP but Zend Server CE instead! You get a nice web GUI for most php configuration needs.
Is there any open-source software which provides all the above
functionalities combined?
No. These tools are maintained for various target audiences and the combination you're asking for wouldn't make much sense in a bundle.
But of course your IDE (Eclipse in this case) integrates nicely with these tools. 'Integrates' means it plays together, doesn't mean it comes bundled with these things.
If anybody of you has already done
such kind of project, could you please
share with me which are the correct
version of softwares I should use to
get it worked error free.
I used to have such a combination (now I'm on Zend Studio with Zend Server CE) and there is no problem with it. The problem is that you're trying to do something unnecessary and wrong.
If you're using XAMPP, you're on a Windows machine, using .so extensions wouldn't do any good at all, Windows needs .dll extensions.
Why do you want to load such extensions anyways? You don't need those in order to get it all working.
Where are your repositories? Only if you want to host your own repositories do you need to run your own server. If that is the case, look at VisualSVNServer. You just install it, no need for integration with anything.
If your repositories are on a location in the net (more likely) you don't need an SVN server, you just need the client. In that case you're ready to go, no need for php extensions. You can checkout repos, commit, export, branch, tag, etc. From within Eclipse or in your file system with TortoiseSVN.
Try it and get back here, if you still experience problems.

Related

What language does SmartFoxServer 2x use on the server side?

I have downloaded and started the community version of SFSx2. I read everything on their documentation page:
http://docs2x.smartfoxserver.com/DevelopmentBasics/introduction
Which unfortunately only talks about flash client side code. Nothing about the corresponding server side code, nor about html5 client side which I need.
I downloaded the HTML5 examples, which took me a long time to find (they are here: http://www.smartfoxserver.com/download/get/140 )
None of the examples work, as they can't connect to the server. Presumably, this is because the examples only supply client side code. There are no instructions supplied on how to install or run the examples.
I can find no mention on the smartfox documenation on the following:
1) what language is used on the server side. One assumes its java.
2) how does one deploy java code to the smartfox server? I cant find any mention of this in the docs.
3) how does one find and install the server part of the client side examples (which are Tris, GameLobby, BuddyMessenger, AdvancedChat).
I applied to be allowed to post on the smartfoxserver forums, but no reply yet.
I also found it hard so I share what I've found out.
The server extensions are written in Java. I used Eclipse JUNO to write my code.
You can download Eclipse here. http://www.eclipse.org/downloads/
You export the extension in jar format from eclipse into you extension path. The name of your file has to end in 'extension' eg MyFirstExtension.jar otherwise sfs2x wont recognize it. Your extension path will be something like this: C:\Program Files\SmartFoxServer2X\SFS2X\extensions\MyFirstExtension\MyFirstExtension.jar if your working in windows.
You will find docs on JAVA API here. http://docs2x.smartfoxserver.com/api-docs/javadoc/server/
This is a link to the basic example code: http://www.smartfoxserver.com/download/get/120
Unzip the content into the [SFS2X_install_folder]/SFS2X/www/root/examples folder, overwriting the existing file. Run the index.html file, then navigate to another index.html to open the example. Run the sfs2x-standalone.exe first of course(see below). If you followed the 'server configuration tutorial' on smartfox website and changed the server ports, the examples wont work. Leave the ports alone until you start to understand the server.
This is a link to the flash example code: http://www.smartfoxserver.com/download/get/108
You will find the example code for apps mentioned above. They are written in Adobe Flash Builder and Java extensions. I don't know if there is any code for HTML5 but the Java server code and AS3 is there.
I also found that using the standalone server was the way to go rather than using SFS2x as a service. c:\program files\smartfoxserver2x\sfs2x\sfs2x-standalone.exe. Using the exe gives you the command prompt window. You can use the window for debugging and see the state of the server when it starts.
Most of the examples should work without creating extensions but to create an extension out of source examples:
Create and setup a new project in your Java IDE. You will have already set up a workspace.
Copy the content of the /source/server/src folder to your project's source folder.
Add SFS2X Libraries. Go to properties of the project -> Select Java Build Path -> Click Library Tab -> Add external jar. Add 'sfs2x.jar' and 'sfs2x-core.jar' from C:\Program Files\SmartFoxServer2X\SFS2X\lib folder. To create the extension, export jar file to extension path. Restart server.
Another problem I had was the Java Version I was using. I had to use Java1.6 with my version of sfs2x when writing extensions. This was trial and error as there was no documentation. There may be a newer version out now.
I had to copy all the server source into eclipse to try and understand how things were done. It was a way of having all the code in one place. There was a lot of trial and error as getting help is hard. I eventually accomplished what I set out to achieve. Good Luck.
SmartFox Server is easy to use even with extension. documentation Give try to Nuggeta solution for game development too. No extension needed at first. This is optionnal.
We have full HTML5 open source game walkthrough on github

Eclipse Auto-Upload on Save, Without Aptana

I'm using Eclipse to develop a website, and I don't want to run Apache, PHP, and MySQL on my local computer. I already have a remote Linux server set up to do that. What I want though, is every time I save a file, Eclipse should upload that file to the Linux server. Dreamweaver does an absolutely perfect job at this task, but I prefer many other features in Eclipse.
I am well aware that there are many, many posts on Stack Overflow about this topic. I have reviewed them, but none seem to quite meet my needs. I'll go through all the possibilities I know about, and talk about why they're not quite right:
Aptana - I specifically excluded this in the question's title. Yes, it does what I'm asking for, but if you install it as an Eclipse plugin, it totally takes over your Eclipse. I only want this one feature, not the whole 800-pound gorilla that changes everything.
Remote System Explorer - I want the primary version to be on my hard drive, not the remote server. This is because I want faster file open, and code completion.
GIT or SVN - When I see other people ask this question on Stack Overflow, someone usually answers "use Git or SVN." Well, I'm already using Git. When I want to sync the entire project, and not just iterate on one file, I will do it using Git. But standalone Git is way too slow if all you want to do is see your changes working. I also don't want to see hundreds of meaningless commits. PTP, mentioned below, is a little better and a little faster, but not fast enough.
PTP - This is an Eclipse plugin that not too many people seem to know about. It has the ability to sync a local folder and a remote folder using Git, and it can do it automatically every time you hit save. This is absolutely awesome, but unfortunately a little slow. When I hit save in Dreamweaver, the change is uploaded to the server in less than one second. The PTP Git operation takes 10 seconds on a tiny project, and I bet that wait gets larger with a larger project. I'm a huge believer in super-fast iteration, and all that PTP waiting will really slow me down.
WebDAV and FTP support for Eclipse - It seems like this is no longer actively developed.
FileSync - Pretty neat, but only supports local filesystem folders.
Are there any other options that I've overlooked? Or are my requirements so specific that there's nothing that fits me right. It seems like there would be other people who want exactly the same thing.
This is my suggestion and it is not quick way to do this, but very customizable.
In eclipse you can set external tools.That means, you can set a php/java script file as external program and send some params that eclipse gives you(${resource_loc} ${project_name} ${resource_path}).
So with script file you can login to SSH or FTP or what ever you want and sync your file or project with remote system.
Just in External Tools Configuration window in eclipse you must set Location to /usr/bin/php
and in Arguments, you can set script path with eclipse variables as script args.
At last you should assign some short key to external program IF Possible.
Did you consider set up Samba server on your Linux and work on you local computer but store project in remote directory served by Samba from Linux or use mentioned FileSync to sync local working directory with network directory (which for Windows look like local and thus FileSync should work).
Or Dropbox?
Edited:
You are constrained heavily I see. Maybe you have on remote host rsync? You could write small utility to manage if your local folder changed (for Windows: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365261(v=vs.85).aspx) and then synchronize folders with rsync via ssh (https://www.digitalocean.com/community/articles/how-to-use-rsync-to-sync-local-and-remote-directories-on-a-vps). This would be completely independent from Eclipse.
you can have a try with CodeSync #github (I write it)
or this one
https://github.com/zhwj184/remotedeploy
Now I am in 2021, and most of the above methods cannot work at all.
Finally, I find a small plugin in Eclipse that is very easy to upload the files (may be not auto-load, but is very easy).
Install the "Alibaba Cloud Toolkit" plugin in Eclipse Marketplace;
Using the right-click "deploy" item to deploy the selected files/directory to the remote directory.
There is also a problem. In my eclipse, the inside Terminal is blank (for all terminals including local terminal and SSH terminal), the blank terminal
But the terminal in RSE is ok.
The terminal in RSE
I also tried to uninstall Alibaba Cloud Toolkit, CDT, TM Terminal, etc.
But the inside terminal does not work anymore.
So I use the terminal in RSE now and put its view, as I just want to run my code on the remote server.

Play!framework; Compile on server only instead on client

Is it possible to compile my Play!framework application only serverside?
Since I connect a samba share to my client from the server hosting Play!, the paths differ between client and server (modules, play, libs). So eclipsify gives me the server paths on my client, instead of using the client paths. Due to this the client gives me a build error.
Solution would be;
Change the eclipsify paths per client configuration.
Only compile my app on the server (preferred since there'll be no differences in env settings).
Can anyone tell me how one of these options would be possible?
Take a look at the play-maven plugin? Using maven for dependency management means all developers will have the same pom/config file, on running a maven build jars/libs will be downloaded from the repository server (you can use your own repo server too).
why don't you install paly framework in the client? this framework is for development tasks so you should install it in your development machine (client i presume). Play framework is freely downloadable and easy to install on your client.
I've found a temp "solution" to let each client define its own path (probably will be overwritten by play eclipsify? Can I change this?).
In Eclipse I've added a variable called PLAY_HOME under Window > Preferences > Java > Build path > Classpath Variables pointing to "D:\play-1.2.2" in this case.
In the .classpath I've replaced all absolute paths:
<classpathentry kind="lib" path="/usr/local/bin/play-1.2.2/framework/lib/...jar" />
to:
<classpathentry kind="var" path="PLAY_HOME/framework/lib/...jar"/>
Still no compilation on the server/continious integration etc. but it's a working solution for now, though it could be improved (the client - server diff dependencies still exists).
Would be nice to check if the version of play matches
Would be nice to make the PLAY_HOME variable optional by defaulting it to '..' (parent dir)
Perhaps an Ant script is what you need?
If I understand your question correctly, you want to develop with multiple developers on a single instance of an application hosted on some server???
It's maybe not the answer you're looking for, but my advice: don't do it this way.
Developing directly on a server, especially with multiple developers, is one of the great anti-patterns in development. Typically, only beginners and rather non-professional developers (no offense meant) do their development this way.
Restarting the server, debugging code, working in the same files... it only ends in tears when doing this 'shared' development.
Make sure you can run the application completely isolated on each workstation. Use version control to check in changes. If two developers have been working on the same code, you at least have a chance to rectify the situation (and a rather good chance if you use e.g. Mercurial or Git). If you still want to a global server to e.g. demo changes to non-developers, just periodically check-out a snapshot from version control and deploy that to this server.

A good development environment setup for Web2Py

Have been trying out Web2Py for a couple of days now and I decided it to be a keeper. But there is one thing that concerns me a lot and that might be a showstopper in the end. I need a nice development environment & setup I can trust and be productive with. Coming from the MS Visual Studio world I'm looking for something with good autocomplete / intellisense + functions for versioning and deployment.
I did some attempts to edit my code in Eclipse but it needs additional setup to run with autocomplete, and for debugging I dont know if it's possible. (Noticed there was a Django project template in Eclipse which is a bit tempting I must say.)
Wing Ide has a instruction on how to get web2py up and running and I am up to testing that one. Not free, but very cheap compared to much in the Windows world.
I also want a good versioning (hg) setup, and preferably a semi-automatic FTP-deployment-method.
What IDE do Web2Py developers use, and how do your setup look like?
A complete setup script for a project in a good IDE would be awesome! (Just like the installation is, one click to get it running 100%).
Pycharm looks good, perhaps that one can add web2py support http://youtrack.jetbrains.net/issue/PY-1648
Thanks a lot!
OS: Windows 7/Windows XP
IDE: NetBeans
Version control: TortoiseHg/NetBeans
Debugger: winpdb
Shell: IPython
Publish: WinSCP/PuTTY/TortoiseHg
Scripts
Once I create a new project in web2py I add a few scripts to my main app folder:
web2py\applications\myapp\DebugWinpdb.bat:
C:\Python25\Scripts\winpdb.bat ..\..\web2py.py -i 127.0.0.1 -p8000 -mypassword
web2py\applications\myapp\DebugShell.bat:
C:\Python25\Scripts\winpdb.bat ..\..\web2py.py -S myapp -M
web2py\applications\myapp\Shell.bat:
python ..\..\web2py.py -S myapp -M
IDE
As others have stated you need to do some extra stuff to get autocomplete/intellisense for web2py no matter what IDE you use.
For me NetBeans was a good compromise between does-everything-if-only-you-can-figure-out-how (Eclipse/PyDev) and does-the-basics-but-few-extras (PyScripter).
NetBeans Setup (Project Properties):
Python Category
Python Platform: Python 2.x (default is Jython)
Run Category
Main Module: web2py.py
Application Arguments: -i 127.0.0.1 -p 8000 -a mypassword
NetBeans Pros:
Tight Mercurial integration
Highlights which lines have been added, changed, or deleted in your source file as you edit it
Selective rollback of individual changes you've made since your last commit
One of the nicest visual diff viewers I have used
Python PEP8 style hints (fully customizable)
Name "foo" is not a valid class name according to your code style (CapitalizedWords)
Name "Bar" is not a valid function name according to your code style (lowercase_with_underscores)
Auto-format hotkey (corrects spacing around operators, etc)
Navigation within source file
semantically indexes current source file
organizes alphabetically by type (Class, method, attribute, etc)
makes even enormous style sheets manageable
NetBeans Cons:
Integrated Debugger doesn't work with web2py (that one really hurts)
Long startup time (but acceptably snappy for me once up and running)
Version Control
I use and highly recommend Mercurial for source control. As mentioned earlier, NetBeans has great support for Mercurial but there are some things I'd just rather do in TortoiseHg.
TortoiseHg Pros:
Shell overlay icons
Repository Explorer
view repos history with graphical display of branching/merging
one stop shop for Incoming, Outgoing, Push, Pull, Update, etc with button for Commit tool
Commit tool
Hunk Selection: cherry pick changes from within a file for more focused Commits
Add, Remove, Diff, Revert, Move, Remove, Forget
TortoiseHg Cons:
No easy way to drop directly into a command line
Bug that regularly prevents files from being removed during commit (waits indef for a lock to be released; running hg addremove from command line is a reliable workaround)
Publishing
I use a combination of WinSCP (for browsing), PuTTY (for terminal commands), and TortoiseHg (for push/pull of my repos) to work with my shared hosting account on Webfaction.
The first thing I do is set up public/private key encryption. If you are having trouble getting this set up between Windows and Linux, try these instructions from Andre Molnar. Short story is you need to generate your private key using ssh-keygen on Linux, copy it down to your Windows machine using WinSCP, then convert it for use with WinSCP and PuTTY.
Then add the following lines to your global mercurial.ini file:
[ui]
ssh = "C:\Program Files\TortoiseHg\TortoisePlink.exe" -ssh -2 -i "c:\path\to\your\privatekey.ppk"
Even if you have to connect to multiple servers, you need only copy your public key to each of the different servers. You'll also want to let WinSCP and PuTTY know where your private key is located, but those are fairly easy to figure out.
Try the new web2py admin interface in trunk. It has a web based mercurial interface and a google deploy interface.
In web2py you can edit applications/admin/models/0.py and set
TEXT_EDITOR = 'amy'
And you will get the web based Amy editor with autocompletion. It is not default because because it does not work with some browsers and because autocompletion is not as good as eclipse. It may work for you.
You can use web2py with Eclipse but you need a minor workaround to let Eclipse know about the web2py environment. It is explained here.
I know other users have used other IDEs with web2py, for example WinIDE and pyCharm. I suggest you ask on the web2py mailing list where people are very helpful.
I'm pretty sure that the 'one-click setup script' to do all that you are looking for does not exist (at the moment). But don't be put off - you can achieve a nice development environment to suit your needs and there are lots of choices.
Although I develop on Windows, I like the setup I have as it's more of a 'Unixy' way of thinking whereby I have a number of tools each doing a specific task. Once you get a workflow setup you can be very productive - although I realise it may look a bit confusing initially coming from a Visual Studio world.
Below I outline what I've settled on. I'm sure others will have their own recommendations. Pick the options you like best.
(There should be hyperlinks to useful software below but I don't have enough reputation to include more than 1 link...)
For developing on Windows I'm enjoying using Pyscripter. It's free, fast (compared to Aptana / Eclipse / Netbeans etc) and has some nice features (dark theme, integrated python console and code explorer to name a few).
To get code completion / intellisense to work for web2py you need to add some code to your model / controller files because of the way web2py works. There are some instructions in this discussion topic on the web2py group.
web2py has a great error ticketing system built in (see the web2py book chapter 3). For more comprehensive debugging, pydb seems to be the way to go. Just put the code below as a breakpoint:
import pydb
pydb.debugger()
and it'll take you to the debugger.
I use TortoiseHg for Mercurial integration and it works wonderfully. Combine that with winscp and you can deploy easily.
Caveats: I work in OS X, and do most of my coding in BBEdit.
That said, I've used both Wing and Komodo IDE for web2py debugging, and they've both worked quite well for me. I haven't tried NetBeans in a while now; when I did the Python support seemed a little rough around the edges. And I've never had the time or patience to come up to speed with Eclipse; it's filed in my mental file cabinet with Emacs, no doubt unjustly to Eclipse and/or Emacs.
(And I'll echo mdipierro's recommendation to try the web2py mailing list; it's really indispensable--one of web2py's strongest points.)
Have you considered using fewer tools? Both Python and web2py don't require a whole lot of code to get a lot accomplished. web2py only adds 10 or 15 new function calls (besides the HTML helpers and validators). You might find that Eclipse and other IDEs actually get in the way. Setting up new apps in web2py is simple through the admin system. Since the new app scaffolding copies the welcome app, you can customize new app setup by editing the welcome app. With Mercurial (or Git, Subversion or Bazaar) you can set up a server on your machine or with one of the public sites and either push or pull updates to your production server. Keep it simple, I say.
we are using web2py framework for all our web application needs and this is our setup :
OS - Ubuntu up-to-date
IDE - Aptana Studio 3.0 with pyDev
Version Control - git
Python 2.7
Browser for developing phase : Chrome
I've found the Wing IDE debugger to be very useful. It's a powerful debugger across the board, and also can be configured to do remote debugging, which is really important when you are running web2py on a no-GUI remote machine (e.g. at Amazon Web Services).

How does ‘Servers’ view work underlying in Eclipse?

‘Servers’ is built-in view in Eclipse. We could integrate Java EE server into Eclipse easily. It could start/stop server both in normal and debug modes. Moreover, we could even set timeout and deployment path, things like that. Various types of server tomcat, jboss, websphere are supported, no intrusive to server.
I am just curious about how these cool things happen behind the scene. The complete mechanism is large and complex, so I just want to know general mechanism about it, an article also could be fine for me. Thank you!
It's the server-specific plugin which does all the work. When integrating a Server in Eclipse you basically need to instruct the plugin where to find the installation root of the server in question. The plugin in turn knows precisely where to locate the default libraries, how to deploy webapps to the server in question and how to start/stop the server with eventually extra commandline arguments.
Since every server make/version needs a different approach (as different as when you need to do it "manually"), I'll only give a Tomcat 6.0 based example how it roughly works. Doubleclick the server entry in Servers view and check the Server Location section. The field Server Path denotes the root location of configuration files. It's by default in Eclipse metadata (when Use workspace metadata is selected). If you browse further in this folder, you'll find something like tmp0\conf\server.xml. It contains information about where the to-be-deployed webapps are located, which context name it should have and so on. The plugin basically gives this information to Tomcat and it will handle it further.
Basically, server adapters are Eclipse plugins and allow to extend the IDE by implementing a set of generic actions (start, debug, stop, deploy, undeploy) that are translated into server specific orders. They also expose server specific configuration parameters. The deployment is more or less intrusive depending on the server (it may be done outside the server folder tree or in a special eclipse folder).