diff --git a/063-Proposed-Collaborative-Workflow-in-JCB.md b/063-Proposed-Collaborative-Workflow-in-JCB.md index e255412..bd8878b 100644 --- a/063-Proposed-Collaborative-Workflow-in-JCB.md +++ b/063-Proposed-Collaborative-Workflow-in-JCB.md @@ -1,2 +1,4 @@ +# PROPOSED COLLABORATIVE WORKFLOW IN JCB + I wanna talk to you about a collaborative workflow now JCB Like any other Joomla component Can function in a shared environmental easily Will you have one website or one system that is online And people can login And they can Edit documents Say that's a components Macon Click on a component And while they're working on that component No one else can Because it will in effect Lock the component out to them so if we open That list you again you see that it's checked out Answer this functionality Is available in JCB already So with it whether it's an admin view whether it's field If your login and someone else opens at our paychecks out the item and so people can work together Quite easily In a shared in Beira mint Weather have 1 JCB But multiple users More than that It's also has a very strong Promotional structure Which if you open the component Builder Permission of area you'll see that it has quite a long list I suppose longer than One might anticipate But it's huge List of permission And that means you can have different groups in your Joomla You know coops and they got into these But I have access and is allowed to work on only certain areas And So your possibilities Of setting up a development workflow with JCB In one Joomla website is endless And that was the whole idea behind here was to make JCB A place where you could have teams work together In Joomla Developing components So this is the The one that's worked from day one this hardest this approach And it is it is very powerful and I've already been told by quite a number of developers that they are using that they put teams working together On components and it is excellent So I'm happy to see that working But like we all know jcps maize most Zahra built environment is an offline environment Where you do development in your own local developing environment Where you maybe have a virtual machine running And you can do doctor appointments Or something like that when you run Joomla and You're safe within your own network And when you do that The collaborative concept of working together other developers Sort of doesn't come to its right And That's what I've been working on And the whole idea of the JCB packages was birthed out of this Meat The need to collaborate with others around a specific component So we've also started working on a area called service In which we now have actually Added This option For sftp which is Oh really smart So you know protocol And it's purely PHP so it it will function In Moving At the moment only moving zip files and things around But the idea would be in the long run That we could possibly create connections between different jcps Which could automatically synchronise things like almost like they're on the same Yeah system But ok Hi I did have a flat open on that On get up Connecting database with each other to sync development on a grid Project That was The issue that I opened up is your 233 And Then there was basically discussion between me And one of my coworkers And then Some other from the community Which ended up in Saying good this is a premium feature And although we have sort of put it on the back burner Like you see me say here I am still very much thinking about Taking this and making this reality I'm so proud of doing that Is taking a specific area of JCB And that area is the import of JCB packages And to improve this area so considerably that we basically The synchronisation will be nothing else but a JCB package traveling from one to the other And updating each other automatically and so To achieve that I started working on a feature Which now is cookies available in the latest version 2.7 Auto Wait where's it Development method right that's the one And what we called it is the default is the way that is always used where And then there's this expansion there's a tutorial about this Which really explains that you can select Specific Components That you've developed And then On the Frequency of this Cron job It will actually build and install This project automatically So that that is the first step of needing to Sort of make that connection between two projects possible No prob 6 I'm literally talking out different to my website right One being offline one being online and then This one that's online to serve like a hub And I'm everybody that's offline Would be pushing the changes to this online and pulling Again from it so that is the long Long-term I'm sorry then if you listening Did you realise where I'm heading I'm I'm trying to get to the point where I can have a theme of the will A parasol having their offline environments Doing development on the same project And as they feel they received a certain level of stability in the project and it's sitting area They can make Literally a pull request To the online environment where JCB is running And then others can review those changes and Made that component can come in as a clone And they can play around with it until they feel ja Das this is good enough And then it can be merged into the main branch somewhere So it's somehow putting get in a in a sort of an interface And Then obviously at some point I became So overwhelmed with the task That I started doing all these other little things that you now see coming about One of them being That I added a BBM package area which basically takes all the packages that we have Available online and put it right here easy to So get hold of it And So there are some free ones between them at the moment like this demo package here All of the packages that Are actually available won't get up The actual Joomla component of this package Will have the source code link Showing up so that you can actually go look if you If you let say use select Which one question and answers Then there's actually a source code Area we can go look on get up To this program and you can actually take it and install it on Joomla website to see it's functionality And to see it's features And if you then Yeah that's how you can evaluate the package easily Basically it means that this JCB back is produced as the source code that's really what a guest house do So now today The The current workflow Model Looks as follow First you need to realise there is the JCB mapped Two-piece there Mapaka component and then there is the Joomla component This is the one that is sort of the feels the views the code everything inside out JCB That can be moved The queen Jcps Being One On what website 100 other So you can actually extract a package And give it to someone and you can import it into his JCB And this is what this Is Where is the Joomla component is the produced package which Then when you compile that mapped component it produces a Joomla component and these are two Different things Although they are the same thing Now When I think about the workflow then This is affecting this But this cannot Effect This So you can Change here make changes to this package and it would uses a different Resolved In this package But if you make changes to this package it does not with me that they would make any difference to this back Package unless you make Use of what we have Call the customer code implementation We do editing Within the ID Then yes then making changes to this package will affect this one But that's all different story And Little bit Beyond what I want to explain here So when I think about a workflow then I would like to see that we make it changed to this package It gets validated by what we have here And then everybody Updates again this package to be the same as what we decided on Here now that may not make sense So the Piazza Melrose And demonstration to this I'm gonna use this question and answers Package as an example So if you were going to become A Collaborator on the question answers package Then you first need to go to the source code of it So on GitHub you would go and open the source code And you will work This source code Which would then Give you the option of making changes to this But not directly Manually But instead through JCP Now That means that you will then clone this repository that you are 4 Down to your local development environment And doing it as follow The first thing you didn't do Is you go back to your component where it's installed on your local developing environment And you open the options area So that you can set the Folder path For your gate Files You gonna have a place Where all you get files basically the component on the recipt Is going to be placed automatically for you So Yeah you would Ampath So I'm gonna place it in my Basically my User folder I'm going create a folder there call to Mama I have to do this manually And then inside of that I'm gonna add another folder called get So that's what I'm gonna do and I'm gonna save this And then I'm quickly gonna create this folders and So I'll show it to you in the command line Ok I need to first add the Company information here Can now save and close it Call another one too Tutus This is just the language make sure To put it to British at this stage that is The Best practice And oh yes not a thing I don't want to have any prefix at this stage And Yes Save and close Ok now we've got our good path setup Now I need to actually create this files In my local developing environment So I'll do that via Command line So first all Make Directory Then I'm gonna change to that directory Now In a director I'm gonna grade another Direct record kit And Change the activity as well So this is the directory where in my components are going to be placed Not the moment if we look inside of this directory there is really nothing showing But The first time I compile a component And I say to the compiler to add my Files to the git repository is going to create A father with all the So code inside it Automatically So you remember that I Cloned This repository on GitHub Joomla questions and answers Now If I do continue I need to get The JCB package for this Installed into my JCB Program The way this is done obviously we we go to the Jason B package area And we select The Questions and answers package And we Get the package Then we add the key And we At the moment there is not really any components On this in install so it's fine to leave this to yes I'm gonna also Force local update of anything And so we can just check again that it is the right package yes it's to correct the cage And the checksum You can read this Basically there is a checksum for the package and at the moment it seems that everything is fine you can make it final Shake off just clicking this link And make sure that this number is the same as the one seeing On the page here And yes it is So always good And then we click continue And there you have it we've got the component in our System This component now If I compile it for the first time Let's again just this for For your sake let me show you That there still is No File here whatsoever Ok Now I'm going to compile this component And I'm gonna say Add to repository folder Ok so this To the component been moved to your local repository folder now we already set the path for this So now you work If we have Say yes and then compile this We see that it's actually been done and it's all well And we now go back to that folder And we check again we see that now there is a folder with its exact name So if we changed into that folder Will see that it is at the moment Alice LA There's no good Information here so this Older is basically just a source code without Any good Connected To it So what we gonna do now At this point We are gonna connect your forked version That you have on GitHub To this folders here And that from now on If you make a change to the component It will be and you'll have to push the changes in this folder to the GitHub repository The way to make this the Get up Link the two to each other SA use the following commands Making sure that you're in the correct directory com - Questions and Dash and - answers - - July - 3 You can run the command r m The chef Capital r Asterix Now you know You might say why This week Compile it in now delete everything Well unfortunately That is the only way to do this Without difficulty you first need to get the information down from get up And Then you might ask why didn't we just do that first and that was because It seemed easier to just let JCB build folder for you And then You use the father And so I'm gonna just wipe out all the files if we checked there now Basically no file left Then we going to Start by Actually pulling The The files down from Qatar First is to say get in it Then to actually add the remote branch And to get the remote branches URL your type out get remote add origin Then go to GitHub Where you f* the branch So and then here you get the your old is copying it here You can either use the htps or the SSH which in my case is what I prefer So your pasted in there and click So to save it If you now would check the the conflict information You see that this remote branch is being added Now the next thing to do is to pull down the master branch This is done with get Pull origin Master This will now get all the information from get out Which basically is the same as what you have Here behind my Command line screen So if we were now to gonna do LS Hello Will see that there There is actually The files all back as they should be but now we have get here as well And my My Command line shows us that we have a git repository and we are on the master branch Ok So that was to get As linked to this repository Now we can go and compile it again at the moment if we do get status It should say that everything is fine and clean And there is no difference between these two But The moment we now Do another compile Is going to change the files obviously So now if we do get Status We see that all these files were modified And we can check to see what is it that was modified by doing git diff And we'll see mostly ok it at it More lines The compiled version Was the 24th of April And now it's the 5th of May Ok scroll down Ok So nice most ok here is another one that changed Ok so there's some XML de changed Hi Jason we made a improvement To the Jason to string in JCB Search also updated those functions And we removed the broom it is Happy prefix To the name so that's been updated So you can look through the diff to see all the changes that has been made The reason why The XML file format is changed Is because we are using different XML compiler here And I can show you that and a moment That you might understand K hold on Here in the global options There is two ways to compile the XML in JCB It's really about While the reason why there are two ways it's because some servers don't support this one This simplexml Option It doesn't support it and mostly because it doesn't have all the PHP Models of things applications Activated So What we then have as a string manipulation option Which basically doesn't use the simplexml but does actually Story Place most of the time Building all these XML field string by string This one is How old days to be started And is most certainly Working very well so I like using it But It's not necessarily The best option It's faster Survey compare that it again now We will most probably see less changes to the XML Because I remember that back he's actually did Have Yeah it's a juice the string manipulation option 30 x is this exit this dude Rescue And then again How to go back in And let's see what changed now dates And yeah there's much less I don't see in XML changes Now Ok So Basically it's just a date That is changed And it's talking about the build date Now this is something we might need to look at Because the reason why it's changed is because we imported it Answer your your application things to build only started Today Wait no 24th of April Times flying that's all I realise that that is actually correct Ok So you we have All the changes is really primarily Just the built date And there's a little bit here there which JCP itself has improved So It's improved with this very bored here Determines that that it's external Value that's with adjacent string memo I said to We've done and improvement there Sabrina just actually flirting the JCB improvement Which is really the way it should be Ok So that means If you now we were going to make a pull request We most probably will say thank you because you basically just updating The JCB improvements to the component Ok so let's show you how that will work You would now make a commit We should look something like this Aroma always show you the the simple easy way to do it There are more precise Better maybe but Difficult difficult ways So hope there's a component with improvements made to JCB And we click that obviously you sign Your comment and Get Porsche So this point You have made a change to component fire your JCP Install And you're pushing it back To your fault version Of this components Joomla component which is on guitar Now that means That if you refresh this page now He'll say that it won't commit ahead Now I think at this point we need to discuss how many changes should you make before you make a pulley Request And if 5677 people make the same changes Regarding Implementing to mlazi vs improvements Who is the we accept in All those kind of things I suppose we'll still be ironed out as we go But at this point you could click make for your quest And it will automatically take Take the Components and show that it can remove then you clicked On that make people request And your comment should usually end up here in the In the title area We will for every package that we manage we'll arrange the add a pull request template With instructions And how to manage it from here further And at this point you're actually saying I've made changes to the JCB Program Package Whatever you wanna call it And these are the changes of made tested and please let me know If you Like what I've done N There will be discussions here and please do not be discouraged if it doesn't go You know quickly There there always be reasons for us to always go through things quite slowly and thoroughly I know in our own In-house developing team Things are going quite fast at this point because we have Sort of come to place of understanding each other's Perspective so it goes quickly But Working with strangers and people we don't know Is obviously going to be more difficult and slower Then you won't have the option of editing all these values like I do because I actually own this report Corsetry But you must probably will be able to Come up to here and actually put in The necessary information that will ask for And then click here create pull request So this point If I did that It will Great a pull request and The developers will be notified and will start communicating from here Now when this pull request with your changes have been Fully accepted And obviously you haven't made further changes To this component Then The next part of the Process needs to happen So If I can illustrate what has happened so far Your first fault The component when you imported that components JCB package Then you made changes in this case we didn't make changes but you could have added a new field or a new View The new compiled It Then in your local development You committed to changes to the get Positive so there's The year is also Linked And commit the changes to get Then you put the changes to the forked A virgin And then you matter pull request And now the next step And this is the place where the Jason package manager is going to really come into play Because now You want to contribute this changes not only To the actual Joomla component which already is well-being You know this this Pull request Is contributing it To this area of the component When this has been finalised The Next Step Is to also contribute it To the JCB map to component And this one is Crucial because then everybody who's Helping to the valet The map component Get this update Via JCB package manager And Ok so we're going to now demonstrate the next step Listen this point your permit is been accepted and merged into the Root The master branch Of the repository Then it should look like this it will say merged And if we were gonna look at this year It's is now up that the component with him prove Nathan Jason B Ok so Really That was The the point at which the next step must take place only once The changes you've made has been accepted In the car Joomla component Butter sauce Of the project Now The Next Step is to do that with Jason the package as well Now all very EMS JCB packages are kept In the day spa packages repository So the next thing you need to do is you need to fork this repository How many 4K suppository Few weeks ago Few days ago But you'll see that It's already 4 commit behind the master branch I can't really do anything Until I get in sync again With this master branch Making a commit now I messed things up and so First thing I'm going to do is make sure that this group this repository Is Insync With the master branch So obviously I needed to be this important needs to be cloned down to my local system Those of you that have quite a number of repositories and keeping them all and sync is a pain When is the shell script update forks Which is very useful Even if you're gonna run the Shell script itself Please sort of Pick up some the commands How to get this done The way this does the moment what it does is it runs I know gets all the repositories that you Your fault and then it also updates them So there are a number of SSH files that you should have a look at I'm I'm just gonna open this Update repositories Well I got the file open here I realise ok this is not gonna work Unless you are able to understand Bosch You must probably not gonna actually Builder follow this So Let me rather do the commands one of the time Inside of that Repo But at least you know that there is a package here And if you do know Get a Sorry I'm in bash Then this is most certainly something to try out It's working very well I'm using it quite a lot And it's give you all my fault repositories up to date and then sync With the master branch so that if I work with them That that it already is ready and I'm able to just you know Jump in and do it But it's not that hard to do it manually anyway So let's do that If you haven't cloned down the repository to your local developing a virement Then you need to do that first nothing of what I'm gonna show you now will work unless you've done that Doki doki mint Asians that get up has that helps with us quite a lot so if your windows For Mac or Linux Yeah you can actually go to this your house or just type in Google update my for creeper And do a search And then look for the one Which sort of Well this is a place you wanna end up at I'm a little gonna tell you that you must first configure Your report to actually see the remote upstream So click on that and do this first And then we'll come back to this one First we do is we gonna just check out In a report what is the remote branches And so we see that it only has this To remote branches And it's fetching food from those Now we want to add the remote branch Which is the upstream branch And we gonna use This one and At the original owner so this one is your name This one must be the original owners name And the original repositories name So those two Values you need to You know update The way to get them is go back to your Repo And just Click on this Value here This should take you to To that Original France And then you can just get it Bike opening This value here So then your type remote Add upstream Like it says there on guitar And you will Control shift We To paste in command line Or as if you you can also paste With the mouse And so there is the repository I have a little Change to my SSH which means I use BBM To her done Tiff I the server name That is something you must have you wouldn't need to do And you click enter Ok so now If we do that Remote branch will now see that there are two Remote branches Two branches Real remote And what is the origin in one of the upstream And that now is Time for The Next Step Which is the sink the fork So first what we will do It will fetch the upstream This will basically fetch the files That has changed From the upstream Which of the states we know Is there Main Master branch Then just to make sure that you are on the master branch We are going to Say Get Checkout Master To make sure you are on the master branch next We are going to Merge The upstream branch into your master branch This will look differently depending on what happened But It will give you a bunch of emotion and then This bronze is now basically The local branch is now in sync With master branch Upstream Master branch now To get this To also update your Branch on GitHub you just need to get Porsche And this will push the changes Back to get Now there are many things that can actually Go wrong or Sort of work out different In in Gate And so I'm not here to teach you how to use git Made you run into Some Grey areas or difficult issues You need to Google and Figure out how to get this done This is just Illustrating The Proposed workflow Of developing components in JCB while collaborating With the greater community Around a JCP package Does it you that watched The tutorial on how to contribute To the community Directory Half day spa packages The match of what I'm gonna be explaining further Is there any covered in that previous tutorial And So we are almost finished with the circle We started by forking the JCB sorry did you lie component And importing the j2ee package Then making changes to that And then compiled it And pushed those changes to the Joomla Repo And when those changes were accepted Into that Repo We now Went to the place where we found the JCP package which in vdms case Is the VDM package area Where if it was a community component then you would follow The explanation given to you in that previous tutorial I'm at this point what we going to do is we basically gonna export the day to be package Added to these packages that we have here And run our hash so if we look at this LS the LA We've got a Hash is a file here But if you want it now There there should be no changes to the repo And Just as we expected nothing changed So everything is up to date at the moment And so the only file we are going to change Is basically these three files here Because we are gonna update this package by exporting it from JCB With the changes we've made Now Since you've contributed those changes to this Question and answers Jamila A component Repulse repository Those who are gonna validate this Push switch we're about to make I'm gonna go back to that repository And make sure that you're not changing things other than we should contribute it there I'm fat But some point my Anticipation is to actually build a bot which would validate this for For us so that this stage it will still be live with manual so be slow Immensely will speed it up and the validation will happen faster and more efficient So you and JCB We now basically click on questions and answers And there is one little snag here which I realised I haven't actually resolved it And that is that you now need to actually have the same King for this package Set in the admin or rather in the component As the one that the developer uses And that can only be given to you by the original owner of this package Which in this case is myself So and where does that what is that mean it means that this export key Must be the same one Is the one that the package was compiled with originally Does you have imported this and you see it clear You can be 1% sure it is not the same key Because this is encrypted field You are basically just seeing the encrypted value Not the actual key The actual key was never exported An encrypted it always remains encrypted and that's why we have the encrypted Fields all around ACP Nope because we think is gonna make the database more secure necessarily That is because when we export and move data around That which is secret stay secret And only within that specific component developing environment of those She's unique So the way you get this is you need to communicate With that developer and actually ask him permission Whether you can extend on this package and then he needs to manually give you this key And so Says I can ask that From From for myself I'm gonna just add that clear to me sure that it is the same key With which it originally was compiled with Ok so now we've got those keys to be the same And it's sort of the way to tell everyone then you and that other developer Are an agreement That this in fact it possibly could happen That once your pull request To the JCP sorry to the July component Repo Has been merged and accepted Then that team needs to give you the key That's how I think will work I'm not home percent sure this gonna be cemented Always got it changed But you do realise that trust and collaboration goes hand in hand So they need to give you the key if it's not a JCP package that actually quiet sake That is a different story And yet the same sort of procedure will reply except the exchange of keys won't be necessary But now that you've got the key in place we basically click here And export the day sweet package So we now have this package Here in this folder And we now need to move it Into the repository Which is also Obviously the one we have now synchronised with our forked version Try video I'm gonna copy it Russia Cup That's got it From my temple folder in my Joomla website To this repository pasted in And is gonna ask if it's with Replace and we're gonna say yes Replace it And there we go with got the package updated Now And we go back to command line And we do Get Turf We'll see that That file is changed Now we also need to run this h This has file To update the And Now get Status P the does files have updated So You possibly I'm not sure what the bill Convention but I think Your pull request to the Joomla Repository of this component The idea of that could possibly be useful here It's just to sort of give a heads up and validate that you did First Contributed code To the actual Joomla component and it was accepted And now this is the change to the package Which also now needs to be looked at Turacos This is the pull request URL Hi I think we just gonna use that And I'll commit message And Use the same commit message Search it looks something like this Update the component with the improvements made in JCB and then be serious And then The repositories username or organisation name The repository name With this Hash one Since it's The pool request was number one Ok that would Do and then Will submit that And Now we push those changes to our Version of the repository Going back to get up then Of the precious been submitted Have a look at this commit You see it actually has a link And this link is to that issue on get up To be easy for us to trace where you have contributed it to the actual Joomla component And why it's all happened being the same comment message Now this stage you again would make a pull request To the master branch Where we will basically review The changes Again at this stage We don't have a pull request templates and everything in place But as soon as they do get to be placed there and please follow those instructions Will try to be as follows we can But obviously being a community is always up for discussion and we will Try and Do this The right way At the moment we can put the ref in the description and then just again the comment in the Title if it's a long comment then just put Maybe a summary here short one and put the wrong comment back in here Ok and then you basically created the pool Quest At this point discussion will begin Validating to see that you followed all the procedures And that this package is stable and ready to become part of the Actual Repo And then once accepted it will be merged into the master branch Become available to the rest of Community So that's At the moment Illustration of what I consider a collaborative workflow in JCB So we Where at Next Step And we had to move today CB Where They have now accepted and merged The Changes you made To the Joomla component And now the owner has given you the original key Because they trust The changes you've made And Uniform to JCB package repository Make sure we have it in sync if it's an old fork Then update the key with the key from the owner Then export to jsp package Added to the local mi4 with commit message and the reference As illustrated Then p changed to your fault report and make a pull request So here Is The Whistler This could Become nicely documented I suppose Someone can take that phone them to even Make some nice search art I maybe not the correct guy for the job And this might Expand and become maybe much more advanced I always could be made more simple But in a nutshell Test Below an hour We're at 47 Hermanus sort of This is the explanation of the collaborative Workflow with external Partners Around a JCB package Once this pull request git merge we are basically back After The dishes in sink And This is in sync And this will continue and I'll go on and on And obviously others will contribute to There there are some other complexities also In this process But that is sort of what I can see happening I know that when you Pull the changes from the previous package you know this Where is it You know the import the JC with package There is the option to import it as a clone Order import it with emerge Now the idea would be that you will only import and merge your JCB package With the global Repo As they accept This pull request And so that You would always stay in sync with what actually is currently the community version Of the package And you could import it it as a clone and make changes to the Clone and effect that will not a fake Take the Maimane Master Version But this all is a trial and error process which You would Sort of show use teach yourself how that works And so my idea is to do that within a blank install try it out Pulling some of the 3 virgins But play around with it Until you become confident And then you are able to also start contributing Do not only the community packages But also William packages to which you've got access And so help improve those components For everyone Well thanks for watching How to sit inside for And I'm sure there might be things that some of you would not able to follow And I would encourage you to just Google to have an Man do some tutorials and Then you I'm sure yours Manage \ No newline at end of file