I would like to create a Meteor project which will be over the web for PC and mobile platforms.
The HTML files will be different for each project however the JavaScript logic should be the same.
Is it possible to create 2 Meteor projects (one for web and other for mobile) with shared JS files?
Maybe using another project?
Sharing and reusing code is the very first reason for the existence of Meteor packages.
To create one simply meteor create --package me:mypackage (assuming me is your Meteor developer account username).
You can add your logic in the package. You can do anything you would normally do in your application development (templates, publications/subscriptions, collections, CSS, ...).
You can then simply publish this package to Atmosphere and reuse it in other projects.
meteor publish --create me:mypackage
There is a lot to know about packages. See more about publishing, testing packages with Jasmine.
Related
I have created a web app using python-Flask and frontend using bootstrap. This app allows user to browse the AWS S3 bucket from web browser. Please excuse me this project is still is construction phase and I'm in learning path. I have manually downloaded the bootstrap code and placed it in static folder.
here is the link for the project.
https://github.com/amjad489/pys3browser
I want to know if there is a way where we can run a command it will upgrade the bootstrap and its dependencies.
Thanks in advance for your help!.
You can use Bower for managing your web packages. It is written for node js so you need to install this as well. This is a very common way to manage your frontend packages like jQuery, Bootstrap, ...
I have very similar apps (90% shared code). I currently have different templates for each app and direct users to different entrypoints depending on the url.
The problem is that users of app A also get all the templates of APP B served in the .js bundle. This is not a problem if I have 3 apps with 90% common code and then 10% overload per app for the individual templates. However, it will become an issue in the long run.
I would normally just run individual meteor instances for each app to keep the bundle small, but this makes it harder to sync the common 90% codebase.
Any best practice for my situation?
While I would suggest using the package system as well, the OP has stated he doesn't want to go that route. One possible alternative would be using Git's submodule system for the common code:
https://git-scm.com/docs/git-submodule
Basically, you have a git repo that has all the common code and acts as a dependent module of your top-level repos with the differing code.
I suggest you to create package for your shared code
Good source to create package:
https://themeteorchef.com/recipes/writing-a-package/
https://medium.com/#davidjwoody/how-to-write-a-package-for-meteor-js-e5534c6bd3c2#.67eeiu59s
After you publish your shared code as package, you can install them to any of your app. Then, you can use your shared code not only on your App A or B, but as much app as you want.
When I create an app using composer, or install another app created using composer, there is a vendor/symfony folder included.
For example, I installed Laravel using composer. The folder vendor/symfony is present. I am not specifically referencing this in my Laravel app at all.
What is this folder, and it needed? Does the app use it, or composer use it? So if I am using an app created using Composer and dont use composer myself, can it safely be deleted and the app still run? Or could the app be using it?
Thanks
Answer is quite simple: Laravel uses Symfony components.
Check this article: http://www.sitepoint.com/build-php-framework-symfony-components/
Improved Routing Engine
Laravel 4.1 features a totally re-written routing layer. The API is
the same; however, registering routes is a full 100% faster compared
to 4.0. The entire engine has been greatly simplified, and the
dependency on Symfony Routing has been minimized to the compiling of
route expressions.
http://laravel.com/docs/master/releases
The "vendor" folder is a standard in every application / framework that uses composer to manage dependencies. In the "vendor" folder you will find all dependencies (read: libraries) that your applicatication requires.
But you will also find all libraries that your libraries require. In order to minimize code duplication, and thanks to the composer system, most open source projects now reuse parts from other open source projects.
BTW, this is great.
Symfony components are excellent and well documented, so they are currently used by many other frameworks and applications.
Inside the "vendor" you may find other libraries that you did not specifically require yourself, but as long as your correctly use composer, that's not something you should worry about.
I have a requirement for a project that is hosted in a shared hosting environment, so we're unable to install or register any custom .NET libraries/dlls/assemblies, etc.
Is there a component that is natively available in IIS 7 that will allow us to create, concatenate, and/or split PDF files? Something like a Persits component, but that doesn't require any custom installation on the server?
Or, alternatively, is there a way to register assemblies (or libraries, or whatever you call them in ASP.NET--bit of a newbie, here) through code...?
You don't need to install anything on the server. You can just add the DLL to your bin folder and everything will work fine. If you are using Visual Studio, just right click the project --> Add Reference and browse to select the .NET library that you will use.
As far as the library itself, I used iTextSharp long time ago and it does offer everything you need as far as splitting, combining and creating PDFs on the fly. Here's the link to the library.
Lots of examples on how to use the library here.
Link to PDFSharp library, as suggested by jrummell (thanks!)
Working on an intranet where we have about 20 different web apps - some .net, some classic asp.
Currently each .net app is its own solution. There are advantages to this - we can build & deploy just one app, without affecting other apps, and all the apps share a session - but we can't use master pages, and there are real challenges using localization resources, shared css and js, etc. Build & deployment is done completely manually, which is a real problem.
I'm trying to set up a structure that will allow us to take advantage of VS2008 features, but still have the ability to update one app without affecting the others while still using features like master pages and localization resources, and sharing session between apps (so we can't set up virtual directories for each app).
If I set up single solution that looks like:
/Root
- App_GlobalResources/
- shared
-- masterpages/
-- css/
- App1/
- App2/
...
- AppN/
..
- ClassicASP1/
then the problem is that the build just produces a single DLL (Root.dll) - this will simply not scale to 20+ apps, all of which have different development cycles.
Is it possible (using nant, or some other build tool) to build multiple DLLs? In this case, I'd like to end up with Root.dll (contains the global resources at least) and App1.dll and App2.dll.
Any other suggestions or references I should look at?
I'm not sure you can do what you want to do, sadly. VS tends to make one DLL per unique project (not solution), and it appears you have just one project, so hence, one DLL.
I'd suggest you keep one project (csproj) per application, but use NANT to build them all (ie, one at a time, together, in order), and package them all up for deployment. That way you can do a single point deployment, but still keep the apps seperate.
I'm surprised you can't use master pages in the sub-folders. You'd need to replicate them for each AppN folder, but again - NANT could be used to pull those in from a common place when you build your deployment package.
Writing a build and deployment script takes a while to get right, but I've found that once it's done, it pays for itself very quickly - even if the only payment is your sanity!
There is a solution to this problem. In short, it entails creating a Web Site Project (which can have the masterpage and whatnot) and several subdirectories, each containing a web project. In the main web project you exclude the subdirs from the project. You then add the project files to the solution. This (updated) link tells you all about it.
-Edoode
I would advise using MSBuild instead of Nant. It is more native to visual studio.