There is yii2 which instaled via composer. What specific steps should be taken to connect the additional library library to the current project. Also same question if need connect only simple class.
Composer found at https://getcomposer.org is your best friend while adding new libraries to yii2 framework.
e.g. you would like to add kartik yii2 widgets found at http://demos.krajee.com/ to your yii2 application.
for that you need to have php installed in your development machine and have it accessible via command line.
e.g. execute following command from command line to check php version.
php -v
if it works then fine, if not, that you need to set path variable.
download composer.phar from https://getcomposer.org
copy composer.phar to that directory.
go to yii2 application folder using CD through command prompt
execute following command from command line
php composer.phar require kartik-v/yii2-widgets "*"
Now sit and watch it kartik extensions of yii2 will be installed.
To simply connect and using any custom class, follow this guide.
http://www.yiiframework.com/wiki/747/write-use-a-custom-component-in-yii2-0/
Yii is mvc framework and it has specific methodology to connect and use with model, view, conntroller.
Follow this link to find more
http://www.yiiframework.com/doc/guide/1.1/en/basics.mvc
Normally additional libraries (extensions) are provided with commands for installing the necessary software by composer and instructions on how to configure these modules and components in this initial configuration file. In the advanced template (the organizing schema of the most appropriate code for professional projects) is called main.php and is located in the config directory of each appllicazione (frontend, backend) and in common area accessible to entering for shared configurations. .
For what regards the addition of classes .. all what is related to the MVC programming pattern is well organized in the appropriate directory, and then the addition of application classes favors this scheme ..
The management of classes or related items can be organized easily into components and modules .........
For all of these and much more you can refer to the guide that is also able to illustrate with concrete examples the many features that characterize Yii.
http://www.yiiframework.com/doc-2.0/guide-index.html
http://www.yiiframework.com/doc-2.0/
Related
First question is supported, to manage add module from one point to all host?
If I run my wildfly domain mode I can't run this
[domain#127.0.0.1:9999 /] module add --name=com.oracle.jdbc --resources=/path/to/ojdbc6.jar --dependencies=javax.api,javax.transaction.api
answer:
The command is not available in the current context (e.g. required subsystems or connection to the controller might be unavailable).
The module operation doesn't work in domain mode because it copies the files locally.
One solution also is to use galleon to provision your modules
I found a very good blog:
https://in.relation.to/2017/05/29/creating-patches-for-wildfly/
This works. If you will add a module to modules/com/.. then in the projekt you have to put modules/system/layers/base/com/..
So you can manage the differences of wildfly-s.
I'm using PhpStorm's Command Line Tool Support for using Laravel's artisan as a "Tool based on Symfony console" as shown below:
Problem is I want to share this across all my projects (global scope). But if I hard code the path to /home/user/project/artisan in Tool path then it runs the that project's directory (not my currently open one). If I just put artisan it doesn't run.
Is there a template variable like $ProjectDir$ or something I can add in the Tool path?
I have a Node server and multiple controllers that perform DB operations and helpers (For e-mail, for example) within that directory.
I'd like to use source from that directory within my functions. Assuming the following directory structure:
src/
server/
/app/controllers/email_helper.js
fns/
send-confirm/
What's the best way to use email_helper within the send-confirm function?
I've tried:
Symbolically linking the 'server' directory
Adding a local repo to send-confirm/package.json
Neither of the above work.
In principle, your Cloud Functions can use any other Node.js module, the same way any standard Node.js server would. However, since Cloud Functions needs to build your module in the cloud, it needs to be able to locate those dependency modules from the cloud. This is where the issue lies.
Cloud Functions can load modules from any one of these places:
Any public npm repository.
Any web-visible URL.
Anywhere in the functions/ directory that firebase init generates for you, and which gets uploaded on firebase deploy.
In your case, from the perspective of functions/package.json, the ../server/ directory doesn't fall under any of those categories, and so Cloud Functions can't use your module. Unfortunately, firebase deploy doesn't follow symlinks, which is why that solution doesn't work.
I see two possible immediate fixes:
Move your server/ directory to be under functions/. I realize this isn't the prettiest directory layout, but it's the easiest fix while hacking. In functions/package.json you can then have a local dependency on ./server.
Expose your code behind a URL somewhere. For example, you could package up a .tar and put that on Google Drive, or on Firebase Cloud Storage. Alternatively, you can use a public git repository.
In the future, I'd love it if firebase deploy followed symlinks. I've filed a feature request for that in Firebase's internal bug tracker.
I never used fortrabbit before and i have a question about it.
I know i can create apps and define the document root, but lets imagine the following:
I want to go with Yii2 Framework (Advanced template)
Advanced template have "two apps" in it (2 folders) the backend and the frontend.
On a real server we have to create two alias, eg:
admin.myapp.com -> root/backend/www
www.myapp.com -> root/frontend/www
Is possible to configure the fortrabbit to work with it within the same application and share the same resources (MySQL, cache, etc)?
your setup is possible at fortrabbit.
Just put both folders in your git repo and push to forrabbit. After that you can route the subdomains (www., admin.) to the subfolders (frontend/www, backend/www).
If your project requires a composer install during the deploy process it will not work our of the box, since we check only for the composer.json/lock in the root of your project.
However you can define your custom post-deploy scripts. In these script you could call a composer install in the subfolders.
Cheers
Oliver (fortrabbit staff)
I have been tasked to look into ways to automate the deployment process for our SSRS 2012 reports. Are there any good tools out there? I'm thinking of something along the lines of press a button and the report gets deployed.
Thanks!
To deploy our SSRS reports, we're using this lovely powershell project:
https://github.com/timabell/ssrs-powershell-deploy
Usage:
.\Deploy-SSRSProject.ps1 -path YourReportsProject.rptproj -configuration Release -verbose
or you can use the alternate parameter set:
.\Deploy-SSRSProject\Deploy-SSRSProject.ps1 -path .\AFS.Reports.rptproj -ServerUrl http://localhost/Reportserver -Folder MyReports -DataSourceFolder "MyReports/Data Sources" -DataSetFolder "MyReports/Datasets" -verbose
The full deployment story (for us):
ssrs-powershell-deploy scripts, .rptproj, .rds, .rdl files are all packaged into a nuget package by our build server.
Octopus Deploy extracts the nuget package on our SSRS server and calls Deploy-SSRSProject.ps1
Visual Studio Deployment
Visual Studio is actually really good at automatic deployment. I've used it a number of times with great results. You need to split your solution into separate projects for each folder on the report server and then it will take a bit of time to configure each project & deployment environment. But after that initial time investment it works wonders and when you add a new project you can simply copy the deployment settings for an existing project.
MSDN article: Set Deployment Properties (Reporting Services)
Rs.exe Utility
Alternatively you can use the Rs.exe utility which comes with SSRS. It is a command-line utility used for automatic deployment and administration. I haven't personally use this one, but I know of it. It is my understanding that there are also third party utilities which leverage Rs.exe in order to automate report deployment but I haven't used any of them so I can't recommend any.
More info on MSDN: RS.exe Utility (SSRS)
I'm sure there are also other third-party tools you could get but I haven't ever looked into them. I've always found the Visual Studio deployment functionality sufficient for my needs.
I have done it using devenv which is located in:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE. The ... 10.0 folder is based on the version no. of your Visual Studio so I have only used this version so cannot vouch for anything else. If you view the help /? commandline switch you can see there are options to build and/or deploy a solution.
In brief I used: devenv {solutionfile} /Deploy {configuration} /Project {projectname}.
I did not use any deployment software but I did know how to code in C#.NET so pays to be familiar with System.IO and System.Xml name spaces.
Given the requirement deploy any file (so reports, datasets or datasources) that has been modified within the past 2 week sprint.
So basically my .net code worked as follows (NB: there are ares that you might have to consider first how well do you know how solution and project files work and if you have more than 1 platform - a platform for the uninitiated is a different set of project build and deployment settings):
Read the sln file line by line to get list of projects for the specific platform that are ready to be built/deployed, for simplicity my code assumed only one platform and all projects were to be deployed
The list from 1 gives me the subproject\subproject.rptproj settings in which I can break on the backslash to get the subfolder name from which I can iterate over all files in the project folder and check each file for the LastWritten datetime stamp of the file to determine what files that need to be deployed.
I back-up the entire file (declaration and contents)
If a file has not changed I edit the project file on the fly using xml and remove all unwanted files (ProjectItem's) not to be deployed
If there are dataset or datasource files changed then I also edit the respective configuration section of the project file and modify the particular configuration section accordingly
Run my build solution process i.e. devenv with commandline args (FYI: I did not encounter any .NET exceptions in this step)
Restore my project file
Providing your SSRS solution is configured correctly and the person running the .net commandline solution has permissions to deploy all should be well. Was easy enough to share my commandline solution source code to anyone else in my team to run to avoid having to white-list the exe if your company has employed such restrictions.