There are places people leave and places people go. Naples might be Italy's third-biggest city, but it is losing some of those people all the time.

It wasn't always that way. The city was once one of the industrial engines of Italy — a history still evident from the husks and dirt of factories in parts of its centre — and its promenades still hold some of the splendid grandeur of a city known for its contribution to the arts, travel, literature, food, football and crime.

But in recent years, like many cities built on industry and manufacturing, some of that glory has faded away. And its young people have left, too — giving Naples that sense of being a place you start, not where you end.

But Apple has reversed that trend. The world's biggest company, that shining core of the American dream, has gone to Naples.

And it hopes to bring people with it. Tucked away in a place that used to be Italy's oldest tomato canning factory is the future of the App Store, a busy hive of activity where Apple is training the developers of the future. And it is doing so in a way befitting a city with such an ancient past and such an industrious present: by filling one the world's oldest state university with the newest techniques and teaching.

Gadget and tech news: In pictures Show all 25 1 /25 Gadget and tech news: In pictures Gadget and tech news: In pictures Gun-toting humanoid robot sent into space Russia has launched a humanoid robot into space on a rocket bound for the International Space Station (ISS). The robot Fedor will spend 10 days aboard the ISS practising skills such as using tools to fix issues onboard. Russia's deputy prime minister Dmitry Rogozin has previously shared videos of Fedor handling and shooting guns at a firing range with deadly accuracy. Dmitry Rogozin/Twitter Gadget and tech news: In pictures Google turns 21 Google celebrates its 21st birthday on September 27. The The search engine was founded in September 1998 by two PhD students, Larry Page and Sergey Brin, in their dormitories at California’s Stanford University. Page and Brin chose the name google as it recalled the mathematic term 'googol', meaning 10 raised to the power of 100 Google Gadget and tech news: In pictures Hexa drone lifts off Chief engineer of LIFT aircraft Balazs Kerulo demonstrates the company's "Hexa" personal drone craft in Lago Vista, Texas on June 3 2019 Reuters Gadget and tech news: In pictures Project Scarlett to succeed Xbox One Microsoft announced Project Scarlett, the successor to the Xbox One, at E3 2019. The company said that the new console will be 4 times as powerful as the Xbox One and is slated for a release date of Christmas 2020 Getty Gadget and tech news: In pictures First new iPod in four years Apple has announced the new iPod Touch, the first new iPod in four years. The device will have the option of adding more storage, up to 256GB Apple Gadget and tech news: In pictures Folding phone may flop Samsung will cancel orders of its Galaxy Fold phone at the end of May if the phone is not then ready for sale. The $2000 folding phone has been found to break easily with review copies being recalled after backlash PA Gadget and tech news: In pictures Charging mat non-starter Apple has cancelled its AirPower wireless charging mat, which was slated as a way to charge numerous apple products at once AFP/Getty Gadget and tech news: In pictures "Super league" India shoots down satellite India has claimed status as part of a "super league" of nations after shooting down a live satellite in a test of new missile technology EPA Gadget and tech news: In pictures 5G incoming 5G wireless internet is expected to launch in 2019, with the potential to reach speeds of 50mb/s Getty Gadget and tech news: In pictures Uber halts driverless testing after death Uber has halted testing of driverless vehicles after a woman was killed by one of their cars in Tempe, Arizona. March 19 2018 Getty Gadget and tech news: In pictures A humanoid robot gestures during a demo at a stall in the Indian Machine Tools Expo, IMTEX/Tooltech 2017 held in Bangalore Getty Gadget and tech news: In pictures A humanoid robot gestures during a demo at a stall in the Indian Machine Tools Expo, IMTEX/Tooltech 2017 held in Bangalore Getty Gadget and tech news: In pictures Engineers test a four-metre-tall humanoid manned robot dubbed Method-2 in a lab of the Hankook Mirae Technology in Gunpo, south of Seoul, South Korea Jung Yeon-Je/AFP/Getty Gadget and tech news: In pictures Engineers test a four-metre-tall humanoid manned robot dubbed Method-2 in a lab of the Hankook Mirae Technology in Gunpo, south of Seoul, South Korea Jung Yeon-Je/AFP/Getty Gadget and tech news: In pictures The giant human-like robot bears a striking resemblance to the military robots starring in the movie 'Avatar' and is claimed as a world first by its creators from a South Korean robotic company Jung Yeon-Je/AFP/Getty Gadget and tech news: In pictures Engineers test a four-metre-tall humanoid manned robot dubbed Method-2 in a lab of the Hankook Mirae Technology in Gunpo, south of Seoul, South Korea Jung Yeon-Je/AFP/Getty Gadget and tech news: In pictures Waseda University's saxophonist robot WAS-5, developed by professor Atsuo Takanishi Rex Gadget and tech news: In pictures Waseda University's saxophonist robot WAS-5, developed by professor Atsuo Takanishi and Kaptain Rock playing one string light saber guitar perform jam session Rex Gadget and tech news: In pictures A test line of a new energy suspension railway resembling the giant panda is seen in Chengdu, Sichuan Province, China Reuters Gadget and tech news: In pictures A test line of a new energy suspension railway, resembling a giant panda, is seen in Chengdu, Sichuan Province, China Reuters Gadget and tech news: In pictures A concept car by Trumpchi from GAC Group is shown at the International Automobile Exhibition in Guangzhou, China Rex Gadget and tech news: In pictures A Mirai fuel cell vehicle by Toyota is displayed at the International Automobile Exhibition in Guangzhou, China Reuters Gadget and tech news: In pictures A visitor tries a Nissan VR experience at the International Automobile Exhibition in Guangzhou, China Reuters Gadget and tech news: In pictures A man looks at an exhibit entitled 'Mimus' a giant industrial robot which has been reprogrammed to interact with humans during a photocall at the new Design Museum in South Kensington, London Getty Gadget and tech news: In pictures A new Israeli Da-Vinci unmanned aerial vehicle manufactured by Elbit Systems is displayed during the 4th International conference on Home Land Security and Cyber in the Israeli coastal city of Tel Aviv Getty

The Apple Developer Academy, which is currently seeking out students for its next year, is the living incarnation of that mix between old and new. It stands in a fairly unremarkable suburb of Napoli, sandwiched between old factories and houses.

But inside is the model of the classroom of the future, specifically created in Apple’s image. Round tables are filled with students using MacBooks and iPhones – on the walls, where a whiteboard might be expected to be, are huge screens hooked up to Apple TVs.

The area where the building now stands is Napoli in miniature. Once one of Italy's most important factories, it supported an entire area — women would work in the canning factory and the other buildings that supported it, while men would work in the port nearby. And then everything came to an end in the late 1970s, leaving a factory with no business and a suburb with no jobs.

But it's not just the students that are seeing the benefits of the area, San Giovanni a Teduccio. The buildings have been specifically built to allow for an open campus, letting people walk around the grounds and neatly-designed lawns. Outside those open gates are arising a network of cafes and restaurants — the school intentionally doesn't have its own cafeteria — including one called iOS food and another that includes a huge picture of Steve Jobs. Both opened up alongside the academy and leave no doubt about where most of their customers are coming from.

“You have a city that is an industrial city; it has a role in the nation and the economy,” says Giorgio Ventre, one of the university's most senior staff members and the man who managed the project to bring Apple to the city. “And you discover that this city is losing – losing jobs, losing opportunities.”

(Apple (Apple)

The city is still doing well, he points out. But mostly from an industry and even technology that like the rest of Italy is focused on the creation of products, rather than the cultivation of innovation. Naples has a huge IT industry, for instance, but it is mostly made up of companies like Accenture that provide services for business.

Construction on the buildings and department that now holds the Developer Academy began slowly — just as you'd expect when dealing with Italian bureaucracy, a number of people involved in the process joke. Documents were first signed in the early 90s, and building began in 2008. Construction was slowed not just by paperwork but by building work too — the area where the school now sits is close to the docks as well as being on the site of a factory, forcing engineers to fend off damage and dirt caused by both sea water and industrial output.

But when Apple arrived, everything started moving fast. The deal to open the school was signed in March; by August, the students had been selected; in October, high ranking government and Apple officials opened the school. (That was as hasty a process as it sounds, with preparations going right up until the last days.)

The academy's first cohort began then and will be graduating very soon, with the second joining soon after. In the coming years more buildings will be finished and more students will be inducted; the first year had about 100 students, and the second will have up to 400.

Entry is selective but straightforward. Apple isn't looking for complete programmers, and so the entrance exams include some coding questions but others on logic, comprehension and critical thinking, too.

(Apple (Apple)

Applications for this year are now open, and Apple is hoping to get more international students in its next cohort. The current group is well-mixed – it has students from as far afield as Mexico and Madagascar – but still mostly comes from Italy, and from Naples specifically.

Once the students arrive at the academy they are introduced to Apple’s specific brand of learning, which is as innovative as its products.

Challenge Based Learning began in a project started in 2008 at Apple to try and find out the design principles for the 21st-century learning environment. The reasons for doing so were obvious: Apple sells a huge amount of devices into classrooms, and having children can help introduce them to the company for the rest of their life. But they also found that the framework was useful elsewhere, too, and developed a whole system that can be applied easily to anything else.

Apple describes Challenge Based Learning in a document on its website, provided to teachers so that they can use some of the same approach in their classrooms. It was developed in part as a response to the huge amount of disengagement in classrooms, which lead more than 30 per cent of students to drop out before the end of their first year of high school.

“To address this need, Apple Inc. worked with teachers and leaders in the education community to develop a new approach to teaching and learning called Challenge Based Learning, an engaging, multidisciplinary approach that starts with standards based content and lets students leverage the technology they use in their daily lives to solve complex, real-world problems,” the document reads.

“Challenge Based Learning is collaborative and hands on, asking students to work with other students, their teachers, and experts in their communities and around the world to develop deeper knowledge of the subjects they are studying, identify and solve challenges, make a difference in their community, and share their results with the world.”

Put more concretely, Challenge Based Learning relies on pushing students to find their own answers to problems. So students in the academy are not given a sheet of different steps to learn to build an app – they’re told from the off to put together the best software they can, being thrown in at the deep end and forced to learn to swim.

The hope is that the students don’t just learn information but learn how to find information. And in the academy at least it seems to work very well – the students are all enthusiastic self-starters, eager to show off the apps that they and not their teachers created.

There might be some concern that Apple — already mocked for the sometimes cult-like devotion of its new fans — could be using the school to train up new acolytes. But there is no oath of allegiance to the iPhone, no enforced commitment to the superiority of iOS; the students are taught in Swift, Apple's programming language, but that has been made open source for use elsewhere and many of the principles learnt on the course will easily apply elsewhere. What's more, students spend an awful lot of their time learning things that will be just as relevant if they come to develop an Android app, or some other kind of product entirely — a large part of the course is focused on things like marketing, design, teamwork and communication. The academy is hoping to turn out fully-formed, entrepreneurial developers, not programming savants with fealty to Apple's Swift or indeed any other programming language.

Apple’s actual intentions are fairly clear: the App Store is now a huge and growing part of its business, and it relies on having the best developers creating the best apps to go inside of it. (Apple hasn’t said how much the project cost, only that it has been a multi-million euro investment.) Any success of the store comes straight back to Apple – immediately, through the 30 per cent cut they take from app sales, and more broadly by helping ensure that the iPhone has the best and latest software available for it.

That economy has helped Apple but it has spawned entire new multi-billion dollar companies, too. The App Store opened the year after the iPhone was released with just 500 native apps; it’s now filled with more than 2 million, and those have helped create 1.2 million jobs.

And the students are being trained to do that, despite the flexibility of the teaching. Each of them receives an iPhone and a MacBook (many of them wear Apple Watches and carry iPads, too) and so learns to create their apps for Apple. Almost all of them were fans first, so there’s no sense of induction this way – but they’re now fully-fledged iOS app developers, ready to turn out new apps to fill up the store.

That cohort for now isn't especially diverse. Only 15 per cent of the course's students are women, and those in the current cohorts are mostly white.

But as with Apple at the corporate level, it is actively encouraging people from a range of different backgrounds to apply. They're doing that both by making sure as many people as possible seek to join — The Independent's trip was the first time that the facility had been opened to the international press, specifically to encourage people from across Europe and elsewhere to join in — and helping them do so, by offering testing facilities across the continent and bursaries for those students that wouldn't be able to afford to stay in the city for nine months.

Encouraging a more diverse range of applicants helps all of them thrive, say people involved with the school — the teaching is unconstrained in a way that other students can offer the best check on each other's thinking. And opening up app development to a wider pool of people also means those experiences will come to be part of the App Store and maybe even Apple's devices themselves, furthering the kind of diversity and openness that the company has been keen to stress in areas like its work on accessibility.

Encouraging people from around the world to apply to the school helps bring “different viewpoints, different ideas”, says Professor Ventre. He worked in the US and elsewhere before returning home to Naples, and says that experience meant that his “first idea was to try and attract students from abroad” when he returned back.

Bringing people to Naples, and giving people a good reason to stay, was a central part of the excitement around the academy.

“It is normal for anyone getting a degree, an education in technology to consider to work abroad,” says Professor Ventre. “It’s normal, it’s fine; I’ve been working in the US for years for example.

“But the idea is that we didn’t want just to have the academy as a place where we keep our guys. The idea is to attract guys from abroad. We really want to create an ecosystem where new ideas can become opportunities.”

(Apple (Apple)

And that opportunity is already showing itself. The academy hasn’t had any students from the UK yet – but it has tempted back Neapolitan young people who had moved to live abroad, including in Britain. One of those was Luigi, who was working in Starbucks as he attempted to find a job in technology in the UK – and then found the application process for the academy.

He applied, and was given an invite to the writing test. That’s when he decided to take the leap – “if you die, you die” – and leave his job at Starbucks so that he could study properly.

“I was taking a risk, but this was the opportunity of my life,” he says. He had tried university already, and found it lacking because it had so little focus on student’s enjoyment and the work of actually solving problems and working with other people.

He passed the test, with flying colours, and joined the first year’s set of students. He’s now working on an impressive game with a huge group, trained up in exactly the kind of skills that he needs to become a developer of the future.

He’d “totally recommend” the same experience to anyone looking to come from elsewhere in the world. The cost of living is very low – it is a city of cheap rents, cheap pizza and cheap coffee – and Apple provides scholarships to those students that otherwise wouldn’t be able to afford it.

Now he isn’t sure whether he’d leave again – the academy might have worked to make Naples not simply a place to come back to but to continue working in. If he does, he will be one of a number of new residents of the city, which also includes international students that have arrived here and found a home.

Professor Ventre tells the story of two students who were looking to register their startup. They initially looked at doing so in their home country – but then found that it was actually easier to do so in Italy.

And staying gives any fledgling company access to the academy’s future recruits – some of the world’s best trained app developers.

“If you stay here you are part of an ecosystem that will continue to train developers,” says Professor Ventre. “This is something that you do need if you want to open a company. You want to count on yourself - but you want to count on the skills you need to help your company grow. If you stay here you can find it.”

Not everyone will stay; many of the international students from the first cohort are finishing up and planning to head back home. Apple hasn’t ruled out taking the developers on itself.